@@ -265,19 +265,6 @@ def _list_feature_views(
265265 feature_views .append (fv )
266266 return feature_views
267267
268- def _list_stream_feature_views (
269- self , allow_cache : bool = False , hide_dummy_entity : bool = True ,
270- ) -> List [StreamFeatureView ]:
271- stream_feature_views = []
272- for sfv in self ._registry .list_stream_feature_views (
273- self .project , allow_cache = allow_cache
274- ):
275- if hide_dummy_entity and sfv .entities [0 ] == DUMMY_ENTITY_NAME :
276- sfv .entities = []
277- sfv .entity_columns = []
278- stream_feature_views .append (sfv )
279- return stream_feature_views
280-
281268 @log_exceptions_and_usage
282269 def list_on_demand_feature_views (
283270 self , allow_cache : bool = False
@@ -302,7 +289,9 @@ def list_stream_feature_views(
302289 Returns:
303290 A list of stream feature views.
304291 """
305- return self ._list_stream_feature_views (allow_cache )
292+ return self ._registry .list_stream_feature_views (
293+ self .project , allow_cache = allow_cache
294+ )
306295
307296 @log_exceptions_and_usage
308297 def list_data_sources (self , allow_cache : bool = False ) -> List [DataSource ]:
@@ -569,9 +558,6 @@ def _make_inferences(
569558 update_feature_views_with_inferred_features_and_entities (
570559 views_to_update , entities + entities_to_update , self .config
571560 )
572- update_feature_views_with_inferred_features_and_entities (
573- sfvs_to_update , entities + entities_to_update , self .config
574- )
575561 # TODO(kevjumba): Update schema inferrence
576562 for sfv in sfvs_to_update :
577563 if not sfv .schema :
@@ -588,53 +574,6 @@ def _make_inferences(
588574 for feature_service in feature_services_to_update :
589575 feature_service .infer_features (fvs_to_update = fvs_to_update_map )
590576
591- def _get_feature_views_to_materialize (
592- self , feature_views : Optional [List [str ]],
593- ) -> List [FeatureView ]:
594- """
595- Returns the list of feature views that should be materialized.
596-
597- If no feature views are specified, all feature views will be returned.
598-
599- Args:
600- feature_views: List of names of feature views to materialize.
601-
602- Raises:
603- FeatureViewNotFoundException: One of the specified feature views could not be found.
604- ValueError: One of the specified feature views is not configured for materialization.
605- """
606- feature_views_to_materialize : List [FeatureView ] = []
607-
608- if feature_views is None :
609- feature_views_to_materialize = self ._list_feature_views (
610- hide_dummy_entity = False
611- )
612- feature_views_to_materialize = [
613- fv for fv in feature_views_to_materialize if fv .online
614- ]
615- stream_feature_views_to_materialize = self ._list_stream_feature_views (
616- hide_dummy_entity = False
617- )
618- feature_views_to_materialize += [
619- sfv for sfv in stream_feature_views_to_materialize if sfv .online
620- ]
621- else :
622- for name in feature_views :
623- try :
624- feature_view = self ._get_feature_view (name , hide_dummy_entity = False )
625- except FeatureViewNotFoundException :
626- feature_view = self ._get_stream_feature_view (
627- name , hide_dummy_entity = False
628- )
629-
630- if not feature_view .online :
631- raise ValueError (
632- f"FeatureView { feature_view .name } is not configured to be served online."
633- )
634- feature_views_to_materialize .append (feature_view )
635-
636- return feature_views_to_materialize
637-
638577 @log_exceptions_and_usage
639578 def _plan (
640579 self , desired_repo_contents : RepoContents
@@ -934,8 +873,8 @@ def apply(
934873
935874 self ._get_provider ().update_infra (
936875 project = self .project ,
937- tables_to_delete = views_to_delete + sfvs_to_delete if not partial else [],
938- tables_to_keep = views_to_update + sfvs_to_update ,
876+ tables_to_delete = views_to_delete if not partial else [],
877+ tables_to_keep = views_to_update ,
939878 entities_to_delete = entities_to_delete if not partial else [],
940879 entities_to_keep = entities_to_update ,
941880 partial = partial ,
@@ -1212,9 +1151,23 @@ def materialize_incremental(
12121151 <BLANKLINE>
12131152 ...
12141153 """
1215- feature_views_to_materialize = self ._get_feature_views_to_materialize (
1216- feature_views
1217- )
1154+ feature_views_to_materialize : List [FeatureView ] = []
1155+ if feature_views is None :
1156+ feature_views_to_materialize = self ._list_feature_views (
1157+ hide_dummy_entity = False
1158+ )
1159+ feature_views_to_materialize = [
1160+ fv for fv in feature_views_to_materialize if fv .online
1161+ ]
1162+ else :
1163+ for name in feature_views :
1164+ feature_view = self ._get_feature_view (name , hide_dummy_entity = False )
1165+ if not feature_view .online :
1166+ raise ValueError (
1167+ f"FeatureView { feature_view .name } is not configured to be served online."
1168+ )
1169+ feature_views_to_materialize .append (feature_view )
1170+
12181171 _print_materialization_log (
12191172 None ,
12201173 end_date ,
@@ -1305,9 +1258,23 @@ def materialize(
13051258 f"The given start_date { start_date } is greater than the given end_date { end_date } ."
13061259 )
13071260
1308- feature_views_to_materialize = self ._get_feature_views_to_materialize (
1309- feature_views
1310- )
1261+ feature_views_to_materialize : List [FeatureView ] = []
1262+ if feature_views is None :
1263+ feature_views_to_materialize = self ._list_feature_views (
1264+ hide_dummy_entity = False
1265+ )
1266+ feature_views_to_materialize = [
1267+ fv for fv in feature_views_to_materialize if fv .online
1268+ ]
1269+ else :
1270+ for name in feature_views :
1271+ feature_view = self ._get_feature_view (name , hide_dummy_entity = False )
1272+ if not feature_view .online :
1273+ raise ValueError (
1274+ f"FeatureView { feature_view .name } is not configured to be served online."
1275+ )
1276+ feature_views_to_materialize .append (feature_view )
1277+
13111278 _print_materialization_log (
13121279 start_date ,
13131280 end_date ,
@@ -1360,7 +1327,6 @@ def push(
13601327 from feast .data_source import PushSource
13611328
13621329 all_fvs = self .list_feature_views (allow_cache = allow_registry_cache )
1363- all_fvs += self .list_stream_feature_views (allow_cache = allow_registry_cache )
13641330
13651331 fvs_with_push_sources = {
13661332 fv
0 commit comments