From 206c6a6e966e72f660631139b0efef8b9c548bfb Mon Sep 17 00:00:00 2001 From: Jiwon Park Date: Tue, 23 May 2023 14:50:55 +0900 Subject: [PATCH] fix: Fix scan datasize to 0 for inference schema (#3628) * fix: Fix scan datasize to 0 for inference schema Signed-off-by: Jiwon Park * style: Rename queryRes to snake case Signed-off-by: Jiwon Park --------- Signed-off-by: Jiwon Park Signed-off-by: zerafachris PERSONAL --- sdk/python/feast/infra/offline_stores/bigquery_source.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/bigquery_source.py b/sdk/python/feast/infra/offline_stores/bigquery_source.py index 536dbc5c14..4888707c09 100644 --- a/sdk/python/feast/infra/offline_stores/bigquery_source.py +++ b/sdk/python/feast/infra/offline_stores/bigquery_source.py @@ -180,9 +180,9 @@ def get_table_column_names_and_types( if not isinstance(schema[0], bigquery.schema.SchemaField): raise TypeError("Could not parse BigQuery table schema.") else: - bq_columns_query = f"SELECT * FROM ({self.query}) LIMIT 1" - queryRes = client.query(bq_columns_query).result() - schema = queryRes.schema + bq_columns_query = f"SELECT * FROM ({self.query}) LIMIT 0" + query_res = client.query(bq_columns_query).result() + schema = query_res.schema name_type_pairs: List[Tuple[str, str]] = [] for field in schema: