Skip to content

Commit e8a1519

Browse files
authored
Fix conditional statements for if OnDemandFVs exist (#1937)
Signed-off-by: Cody Lin <codyl@twitter.com>
1 parent 156d004 commit e8a1519

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sdk/python/feast/infra/offline_stores/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def to_bigquery(
255255
path = f"{self.client.project}.{self.config.offline_store.dataset}.historical_{today}_{rand_id}"
256256
job_config = bigquery.QueryJobConfig(destination=path)
257257

258-
if not job_config.dry_run and self.on_demand_feature_views is not None:
258+
if not job_config.dry_run and self.on_demand_feature_views:
259259
job = _write_pyarrow_table_to_bq(
260260
self.client, self.to_arrow(), job_config.destination
261261
)

sdk/python/feast/infra/offline_stores/redshift.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def _to_arrow_internal(self) -> pa.Table:
265265

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

286286
def to_redshift(self, table_name: str) -> None:
287287
""" Save dataset as a new Redshift table """
288-
if self.on_demand_feature_views is not None:
288+
if self.on_demand_feature_views:
289289
transformed_df = self.to_df()
290290
aws_utils.upload_df_to_redshift(
291291
self._redshift_client,

0 commit comments

Comments
 (0)