You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/17 19:36:36 UTC

[GitHub] [spark] hvanhovell commented on a change in pull request #28247: [SPARK-31473][SQL] AQE should set active session during execution

hvanhovell commented on a change in pull request #28247: [SPARK-31473][SQL] AQE should set active session during execution
URL: https://github.com/apache/spark/pull/28247#discussion_r410430524
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
 ##########
 @@ -139,7 +139,9 @@ case class AdaptiveSparkPlanExec(
   }
 
   private def getFinalPhysicalPlan(): SparkPlan = lock.synchronized {
-    if (!isFinalPlan) {
+    if (isFinalPlan) return currentPhysicalPlan
+
+    context.session.withActive {
 
 Review comment:
   Maybe add a comment why this is needed. Something in the spirit of `Adaptive execution can replan a query outside of withActive scope functions (e.g. plan.queryExecution.rdd and that is why we need to set it here.`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org