cloud-fan commented on a change in pull request #25471: [SPARK-28753][SQL]
Dynamically reuse subqueries in AQE
URL: https://github.com/apache/spark/pull/25471#discussion_r314610611
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/InsertAdaptiveSparkPlan.scala
##########
@@ -53,12 +56,13 @@ case class InsertAdaptiveSparkPlan(
// Plan sub-queries recursively and pass in the shared stage cache for
exchange reuse. Fall
// back to non-adaptive mode if adaptive execution is supported in any
of the sub-queries.
val subqueryMap = buildSubqueryMap(plan)
- // Run preparation rules.
- val preparations =
AdaptiveSparkPlanExec.createQueryStagePreparationRules(
- session.sessionState.conf, subqueryMap)
- val newPlan = AdaptiveSparkPlanExec.applyPhysicalRules(plan,
preparations)
+ val planSubqueriesRule = PlanAdaptiveSubqueries(subqueryMap)
+ val preprocessingRules = Seq(
+ planSubqueriesRule)
+ // Run pre-processing rules.
+ val newPlan = AdaptiveSparkPlanExec.applyPhysicalRules(plan,
preprocessingRules)
Review comment:
can we do it at
https://github.com/apache/spark/pull/25471/files#diff-6954dd8020a9ca298f1fb9602c0e831cR125
?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]