Skip to content

Commit 4318134

Browse files
committed
Fix entity column exclusion in codegen and type widening in mapper
- codegen: stop excluding entity columns from FeatureView schema, matching mapper behavior (FeatureView.__init__ expects them) - mapper: map Int32 to ValueType.INT32 and Float32 to ValueType.FLOAT instead of widening to INT64/DOUBLE
1 parent d05b131 commit 4318134

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sdk/python/feast/dbt/codegen.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ def generate(
248248
if not entity_cols:
249249
raise ValueError("At least one entity column must be specified")
250250

251-
excluded = set(entity_cols) | {self.timestamp_field}
251+
# Note: entity columns should NOT be excluded - FeatureView.__init__
252+
# expects entity columns to be in the schema and will extract them
253+
excluded = {self.timestamp_field}
252254
if exclude_columns:
253255
excluded.update(exclude_columns)
254256

sdk/python/feast/dbt/mapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
# Mapping from FeastType to ValueType for entity value inference
3030
FEAST_TYPE_TO_VALUE_TYPE: Dict[FeastType, ValueType] = {
3131
String: ValueType.STRING,
32-
Int32: ValueType.INT64,
32+
Int32: ValueType.INT32,
3333
Int64: ValueType.INT64,
34-
Float32: ValueType.DOUBLE,
34+
Float32: ValueType.FLOAT,
3535
Float64: ValueType.DOUBLE,
3636
Bool: ValueType.BOOL,
3737
Bytes: ValueType.BYTES,

0 commit comments

Comments
 (0)