Skip to content

Commit 34f99b9

Browse files
updated FeatureViewProjection batch_source serialization
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent 52d4253 commit 34f99b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sdk/python/feast/feature_view_projection.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ def to_proto(self) -> FeatureViewProjectionProto:
7373
return feature_reference_proto
7474

7575
@staticmethod
76-
def from_proto(proto: FeatureViewProjectionProto):
76+
def from_proto(proto: FeatureViewProjectionProto) -> "FeatureViewProjection":
77+
batch_source = (
78+
DataSource.from_proto(proto.batch_source)
79+
if str(getattr(proto, "batch_source"))
80+
else None
81+
)
7782
feature_view_projection = FeatureViewProjection(
7883
name=proto.feature_view_name,
7984
name_alias=proto.feature_view_name_alias or None,
@@ -83,7 +88,7 @@ def from_proto(proto: FeatureViewProjectionProto):
8388
timestamp_field=proto.timestamp_field or None,
8489
date_partition_column=proto.date_partition_column or None,
8590
created_timestamp_column=proto.created_timestamp_column or None,
86-
batch_source=proto.batch_source or None,
91+
batch_source=batch_source,
8792
)
8893
for feature_column in proto.feature_columns:
8994
feature_view_projection.features.append(Field.from_proto(feature_column))

0 commit comments

Comments
 (0)