hvanhovell 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_r309864918
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -119,7 +120,11 @@ case class AdaptiveSparkPlanExec(
currentPhysicalPlan.execute()
} else {
val executionId = Option(
-
session.sparkContext.getLocalProperty(SQLExecution.EXECUTION_ID_KEY)).map(_.toLong)
+
session.sparkContext.getLocalProperty(SQLExecution.EXECUTION_ID_KEY)).flatMap {
idStr =>
+ val id = idStr.toLong
+ val qe = SQLExecution.getQueryExecution(id)
+ if (qe.eq(queryExecution)) Some(id) else None
Review comment:
Can you add some doc on why this is needed. It is kinda annoying when you
have to check the git blame to figure out why code is there.
----------------------------------------------------------------
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]