From 110f458c9880a8eefa0541463744c7cc57983928 Mon Sep 17 00:00:00 2001 From: David Y Liu <7172604+mavysavydav@users.noreply.github.com> Date: Wed, 13 Oct 2021 15:19:00 -0700 Subject: [PATCH] Fix __getitem__ return for feature view and on-demand feature view (#1936) Signed-off-by: David Y Liu --- sdk/python/feast/feature_view.py | 2 +- sdk/python/feast/on_demand_feature_view.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/feature_view.py b/sdk/python/feast/feature_view.py index 3a5e78d83f..d02fc842e9 100644 --- a/sdk/python/feast/feature_view.py +++ b/sdk/python/feast/feature_view.py @@ -181,7 +181,7 @@ def __getitem__(self, item): cp = self.__copy__() cp.projection.features = referenced_features - return self + return cp def __eq__(self, other): if not isinstance(other, FeatureView): diff --git a/sdk/python/feast/on_demand_feature_view.py b/sdk/python/feast/on_demand_feature_view.py index 4ec2b138b2..0516346986 100644 --- a/sdk/python/feast/on_demand_feature_view.py +++ b/sdk/python/feast/on_demand_feature_view.py @@ -87,7 +87,7 @@ def __getitem__(self, item): cp = self.__copy__() cp.projection.features = referenced_features - return self + return cp def with_name(self, name: str): """