From c6536e7eb90f16eac428a95fbc35d91357ec58f7 Mon Sep 17 00:00:00 2001 From: Felix Wang Date: Tue, 26 Jul 2022 14:42:07 -0700 Subject: [PATCH] Fix no ttl logic Signed-off-by: Felix Wang --- sdk/python/feast/infra/offline_stores/file.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/python/feast/infra/offline_stores/file.py b/sdk/python/feast/infra/offline_stores/file.py index 1af98c1437..829bd36c3d 100644 --- a/sdk/python/feast/infra/offline_stores/file.py +++ b/sdk/python/feast/infra/offline_stores/file.py @@ -635,6 +635,14 @@ def _filter_ttl( ) ] + df_to_join = df_to_join.persist() + else: + df_to_join = df_to_join[ + # do not drop entity rows if one of the sources returns NaNs + df_to_join[timestamp_field].isna() + | (df_to_join[timestamp_field] <= df_to_join[entity_df_event_timestamp_col]) + ] + df_to_join = df_to_join.persist() return df_to_join