AdaptiveExecutionContext¶
AdaptiveExecutionContext is the execution context to share the following between the main query and all subqueries:
Creating Instance¶
AdaptiveExecutionContext takes the following to be created:
AdaptiveExecutionContext is created when:
QueryExecutionis requested for the physical preparations rules (and creates an InsertAdaptiveSparkPlan)
Subquery Cache¶
subqueryCache: TrieMap[SparkPlan, BaseSubqueryExec]
AdaptiveExecutionContext creates a TrieMap (Scala) of SparkPlans (canonicalized ExecSubqueryExpressions to be precise) and associated BaseSubqueryExecs.
subqueryCache is used when:
AdaptiveSparkPlanExecphysical operator is requested for the adaptive optimizations (and creates a ReuseAdaptiveSubquery)
Stage Cache¶
stageCache: TrieMap[SparkPlan, QueryStageExec]
AdaptiveExecutionContext creates a TrieMap (Scala) of SparkPlans (canonicalized Exchanges to be precise) and associated QueryStageExecs.
stageCache is used when:
AdaptiveSparkPlanExecphysical operator is requested to createQueryStages