From fdb5f215fe7f4946a6c88cfb34dc0c24eb5ac733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnar=20Sv=20Sigurbj=C3=B6rnsson?= Date: Tue, 1 Mar 2022 07:35:05 +0000 Subject: [PATCH] fix: Method _should_use_plan only returns true for local sqlite provider (#2344) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only the SQLite local provider supports _plan and _apply_diffs. Updated the method to only return true for that setup so that other local providers don't need to implement these methods right now. Signed-off-by: Gunnar Sv Sigurbjörnsson --- sdk/python/feast/feature_store.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/feature_store.py b/sdk/python/feast/feature_store.py index fcd94f9bea..d71ecbaaf4 100644 --- a/sdk/python/feast/feature_store.py +++ b/sdk/python/feast/feature_store.py @@ -392,8 +392,10 @@ def _get_features( def _should_use_plan(self): """Returns True if _plan and _apply_diffs should be used, False otherwise.""" - # Currently only the local provider supports _plan and _apply_diffs. - return self.config.provider == "local" + # Currently only the local provider with sqlite online store supports _plan and _apply_diffs. + return self.config.provider == "local" and ( + self.config.online_store and self.config.online_store.type == "sqlite" + ) def _validate_all_feature_views( self,