Skip to content

Commit

Permalink
fix: Optimize bytes processed when retrieving entity df schema to 0 (#…
Browse files Browse the repository at this point in the history
…3680)

feat: Optimize bytes processed when retrieving entity df schema to 0

Signed-off-by: Hai Nguyen <quanghai.ng1512@gmail.com>
  • Loading branch information
sudohainguyen committed Jul 13, 2023
1 parent 478caec commit 1c01035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ def _get_entity_schema(
) -> Dict[str, np.dtype]:
if isinstance(entity_df, str):
entity_df_sample = (
client.query(f"SELECT * FROM ({entity_df}) LIMIT 1").result().to_dataframe()
client.query(f"SELECT * FROM ({entity_df}) LIMIT 0").result().to_dataframe()
)

entity_schema = dict(zip(entity_df_sample.columns, entity_df_sample.dtypes))
Expand Down

0 comments on commit 1c01035

Please sign in to comment.