Skip to content

Commit

Permalink
Fix conditional statements for if OnDemandFVs exist (#1937)
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Lin <codyl@twitter.com>
  • Loading branch information
codyjlin authored Oct 14, 2021
1 parent 156d004 commit e8a1519
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def to_bigquery(
path = f"{self.client.project}.{self.config.offline_store.dataset}.historical_{today}_{rand_id}"
job_config = bigquery.QueryJobConfig(destination=path)

if not job_config.dry_run and self.on_demand_feature_views is not None:
if not job_config.dry_run and self.on_demand_feature_views:
job = _write_pyarrow_table_to_bq(
self.client, self.to_arrow(), job_config.destination
)
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/feast/infra/offline_stores/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def _to_arrow_internal(self) -> pa.Table:

def to_s3(self) -> str:
""" Export dataset to S3 in Parquet format and return path """
if self.on_demand_feature_views is not None:
if self.on_demand_feature_views:
transformed_df = self.to_df()
aws_utils.upload_df_to_s3(self._s3_resource, self._s3_path, transformed_df)
return self._s3_path
Expand All @@ -285,7 +285,7 @@ def to_s3(self) -> str:

def to_redshift(self, table_name: str) -> None:
""" Save dataset as a new Redshift table """
if self.on_demand_feature_views is not None:
if self.on_demand_feature_views:
transformed_df = self.to_df()
aws_utils.upload_df_to_redshift(
self._redshift_client,
Expand Down

0 comments on commit e8a1519

Please sign in to comment.