cloud-fan commented on a change in pull request #25316: [SPARK-28583][SQL]
Subqueries should not call `onUpdatePlan` in Adaptive Query Execution
URL: https://github.com/apache/spark/pull/25316#discussion_r309578343
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/InsertAdaptiveSparkPlan.scala
##########
@@ -120,7 +124,7 @@ case class InsertAdaptiveSparkPlan(session: SparkSession)
extends Rule[SparkPlan
val queryExec = new QueryExecution(session, plan)
// Apply the same instance of this rule to sub-queries so that sub-queries
all share the
// same `stageCache` for Exchange reuse.
- val adaptivePlan = this.apply(queryExec.sparkPlan)
+ val adaptivePlan = this.applyInternal(queryExec.sparkPlan, queryExec)
Review comment:
When we reach here, it means we are creating `AdaptiveSparkPlanExec` for
subqueries. Shall we simply set a boolean flag here (e.g.
`adaptivePlan.copy(isSubquery = true)`) instead of passing around the
`QueryExecution`?
----------------------------------------------------------------
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]