Skip to content

Commit f763dc9

Browse files
committed
fix postgres test
1 parent 6c38b92 commit f763dc9

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

sdk/python/feast/feature_store.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,26 +1991,22 @@ def _retrieve_from_online_store(
19911991
top_k=top_k,
19921992
)
19931993

1994-
null_value = Value()
1995-
not_found_status = FieldStatus.NOT_FOUND
1996-
present_status = FieldStatus.PRESENT
1997-
19981994
read_row_protos = []
19991995
row_ts_proto = Timestamp()
20001996

2001-
for row_ts, feature_val, distance in documents:
1997+
for row_ts, feature_val, distance_val in documents:
20021998
# Reset timestamp to default or update if row_ts is not None
20031999
if row_ts is not None:
20042000
row_ts_proto.FromDatetime(row_ts)
20052001

20062002
if feature_val is None:
2007-
status = not_found_status
2008-
value = null_value
2003+
feature_val = Value()
2004+
distance_val = Value()
2005+
status = FieldStatus.NOT_FOUND
20092006
else:
2010-
status = present_status
2011-
value = feature_val
2007+
status = FieldStatus.PRESENT
20122008

2013-
read_row_protos.append((row_ts_proto, status, value, distance))
2009+
read_row_protos.append((row_ts_proto, status, feature_val, distance_val))
20142010
return read_row_protos
20152011

20162012
@staticmethod

0 commit comments

Comments
 (0)