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_r309693211
 
 

 ##########
 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:
   nvm, this is more flexible, in case some places create `QueryExecution` 
without execution id and execute.

----------------------------------------------------------------
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]

Reply via email to