Skip to content

Commit

Permalink
Dedupe columns when extracting from the dataframe
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <[email protected]>
  • Loading branch information
achals committed Jun 2, 2021
1 parent 88d2abf commit f5e62a2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/python/feast/infra/offline_stores/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ def pull_latest_from_table_or_query(
# make driver_id a normal column again
last_values_df.reset_index(inplace=True)

table = pyarrow.Table.from_pandas(
last_values_df[join_key_columns + feature_name_columns + ts_columns]
)
columns_to_extract = set(join_key_columns + feature_name_columns + ts_columns)
table = pyarrow.Table.from_pandas(last_values_df[columns_to_extract])

return table

0 comments on commit f5e62a2

Please sign in to comment.