Skip to content

Commit 4cbf97b

Browse files
chore: Construct FeatureView with timedelta instead of Duration object (#2445)
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent 3db4b1b commit 4cbf97b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sdk/python/feast/feature_view.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,9 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
327327
owner=feature_view_proto.spec.owner,
328328
online=feature_view_proto.spec.online,
329329
ttl=(
330-
None
331-
if feature_view_proto.spec.ttl.seconds == 0
332-
and feature_view_proto.spec.ttl.nanos == 0
333-
else feature_view_proto.spec.ttl
330+
timedelta(days=0)
331+
if feature_view_proto.spec.ttl.ToNanoseconds() == 0
332+
else feature_view_proto.spec.ttl.ToTimedelta()
334333
),
335334
batch_source=batch_source,
336335
stream_source=stream_source,

0 commit comments

Comments
 (0)