File tree Expand file tree Collapse file tree
sdk/python/feast/infra/compute_engines Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def get_execution_context(
5454 for name in task .feature_view .entities
5555 ]
5656 entity_df = None
57- if task .entity_df is not None :
57+ if hasattr ( task , "entity_df" ) and task .entity_df is not None :
5858 entity_df = task .entity_df
5959
6060 column_info = self .get_column_info (task )
Original file line number Diff line number Diff line change 11from feast .infra .compute_engines .base import ComputeEngine
2- from feast .infra .compute_engines .dag .context import ExecutionContext
32from feast .infra .compute_engines .spark .feature_builder import SparkFeatureBuilder
43from feast .infra .compute_engines .spark .job import SparkDAGRetrievalJob
54from feast .infra .compute_engines .spark .utils import get_or_create_new_spark_session
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ class SparkDAGRetrievalJob(SparkRetrievalJob):
1616 def __init__ (
1717 self ,
1818 spark_session : SparkSession ,
19+ plan : Optional [ExecutionPlan ],
1920 context : ExecutionContext ,
2021 full_feature_names : bool ,
2122 config : RepoConfig ,
22- plan : Optional [ExecutionPlan ] = None ,
2323 on_demand_feature_views : Optional [List [OnDemandFeatureView ]] = None ,
2424 metadata : Optional [RetrievalMetadata ] = None ,
2525 error : Optional [BaseException ] = None ,
@@ -52,5 +52,5 @@ def to_spark_df(self) -> pyspark.sql.DataFrame:
5252 return self ._spark_df
5353
5454 def to_sql (self ) -> str :
55- self ._ensure_executed ()
55+ assert self ._plan is not None , "Execution plan is not set"
5656 return self ._plan .to_sql (self ._context )
You can’t perform that action at this time.
0 commit comments