Skip to content

Commit

Permalink
fix: Fix scan datasize to 0 for inference schema (#3628)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
phil-park committed May 23, 2023
1 parent 9b227d7 commit c3dd74e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/python/feast/infra/offline_stores/bigquery_source.py
Expand Up @@ -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:
Expand Down

0 comments on commit c3dd74e

Please sign in to comment.