From 4198126c02cf89ca1a84412d016dbb6e8d1b4f56 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Wed, 11 May 2022 13:32:16 -0700 Subject: [PATCH] fix: Delete data sources from registy when using the diffing logic Signed-off-by: Achal Shah --- sdk/python/feast/diff/registry_diff.py | 5 +++++ sdk/python/feast/infra/offline_stores/file.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/diff/registry_diff.py b/sdk/python/feast/diff/registry_diff.py index b2caec2b68..6f372a7915 100644 --- a/sdk/python/feast/diff/registry_diff.py +++ b/sdk/python/feast/diff/registry_diff.py @@ -295,6 +295,11 @@ def apply_diff_to_registry( registry.delete_feature_view( feature_view_obj.name, project, commit=False, ) + elif feast_object_diff.feast_object_type == FeastObjectType.DATA_SOURCE: + ds_obj = cast(DataSource, feast_object_diff.current_feast_object) + registry.delete_data_source( + ds_obj.name, project, commit=False, + ) if feast_object_diff.transition_type in [ TransitionType.CREATE, diff --git a/sdk/python/feast/infra/offline_stores/file.py b/sdk/python/feast/infra/offline_stores/file.py index 2dea5714fa..f36eb383d8 100644 --- a/sdk/python/feast/infra/offline_stores/file.py +++ b/sdk/python/feast/infra/offline_stores/file.py @@ -187,7 +187,6 @@ def evaluate_historical_retrieval(): entity_df_event_timestamp_col ) - join_keys = [] all_join_keys = [] # Load feature view data from sources and join them incrementally