Skip to content

Commit c3dd74e

Browse files
authored
fix: Fix scan datasize to 0 for inference schema (feast-dev#3628)
* fix: Fix scan datasize to 0 for inference schema Signed-off-by: Jiwon Park <bakjeeone@hotmail.com> * style: Rename queryRes to snake case Signed-off-by: Jiwon Park <bakjeeone@hotmail.com> --------- Signed-off-by: Jiwon Park <bakjeeone@hotmail.com>
1 parent 9b227d7 commit c3dd74e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def get_table_column_names_and_types(
180180
if not isinstance(schema[0], bigquery.schema.SchemaField):
181181
raise TypeError("Could not parse BigQuery table schema.")
182182
else:
183-
bq_columns_query = f"SELECT * FROM ({self.query}) LIMIT 1"
184-
queryRes = client.query(bq_columns_query).result()
185-
schema = queryRes.schema
183+
bq_columns_query = f"SELECT * FROM ({self.query}) LIMIT 0"
184+
query_res = client.query(bq_columns_query).result()
185+
schema = query_res.schema
186186

187187
name_type_pairs: List[Tuple[str, str]] = []
188188
for field in schema:

0 commit comments

Comments
 (0)