From f23b4fc065f401d915ccc921e0c765f894012e1a Mon Sep 17 00:00:00 2001 From: Cody Lin Date: Mon, 12 Jul 2021 12:54:11 -0700 Subject: [PATCH] Fix dry_run bug that was making to_bigquery hang indefinitely Signed-off-by: Cody Lin --- sdk/python/feast/infra/offline_stores/bigquery.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery.py b/sdk/python/feast/infra/offline_stores/bigquery.py index acd828bf8f..3342898aa6 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery.py +++ b/sdk/python/feast/infra/offline_stores/bigquery.py @@ -268,17 +268,17 @@ def to_bigquery(self, job_config: bigquery.QueryJobConfig = None) -> Optional[st bq_job = self.client.query(self.query, job_config=job_config) - block_until_done(client=self.client, bq_job=bq_job) - - if bq_job.exception(): - raise bq_job.exception() - if job_config.dry_run: print( "This query will process {} bytes.".format(bq_job.total_bytes_processed) ) return None + block_until_done(client=self.client, bq_job=bq_job) + + if bq_job.exception(): + raise bq_job.exception() + print(f"Done writing to '{job_config.destination}'.") return str(job_config.destination)