Skip to content

Commit 3668702

Browse files
sfc-gh-madkinsadchia
authored andcommitted
fix: Fix field mapping logic during feature inference (#3067)
fix: Fix bug where feature inference was improperly registering timestamp and created field if part of field_mapping Signed-off-by: Miles Adkins <[email protected]> Signed-off-by: Miles Adkins <[email protected]>
1 parent bdc3451 commit 3668702

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎sdk/python/feast/inference.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ def _infer_features_and_entities(
192192
fv.batch_source.timestamp_field,
193193
fv.batch_source.created_timestamp_column,
194194
}
195-
for column in columns_to_exclude:
196-
if column in fv.batch_source.field_mapping:
197-
columns_to_exclude.remove(column)
198-
columns_to_exclude.add(fv.batch_source.field_mapping[column])
195+
for original_col, mapped_col in fv.batch_source.field_mapping.items():
196+
if mapped_col in columns_to_exclude:
197+
columns_to_exclude.remove(mapped_col)
198+
columns_to_exclude.add(original_col)
199199

200200
table_column_names_and_types = fv.batch_source.get_table_column_names_and_types(
201201
config

0 commit comments

Comments
 (0)