Skip to content

Commit 1cf98c2

Browse files
committed
fix: correct entity value type mapping for aliased feature views
Fix issue where entity value types were incorrectly mapped when using feature views with join key aliases. Previously, the entity_type_map would use the original column name instead of the aliased join key, causing target_user_id to be interpreted as ValueType.INT64 instead of the correct entity value type. The fix ensures that when a feature view has a join key map, the entity type mapping uses the correct aliased column name from the projection's join_key_map.
1 parent 35f211c commit 1cf98c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sdk/python/feast/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,13 @@ def _get_entity_maps(
693693
entity.join_key, entity.join_key
694694
)
695695
entity_name_to_join_key_map[entity_name] = join_key
696+
696697
for entity_column in feature_view.entity_columns:
697-
entity_type_map[entity_column.name] = entity_column.dtype.to_value_type()
698+
dtype = entity_column.dtype.to_value_type()
699+
entity_join_key_column_name = feature_view.projection.join_key_map.get(
700+
entity_column.name, entity_column.name
701+
)
702+
entity_type_map[entity_join_key_column_name] = dtype
698703

699704
return (
700705
entity_name_to_join_key_map,

0 commit comments

Comments
 (0)