ulysses-you commented on code in PR #44013:
URL: https://github.com/apache/spark/pull/44013#discussion_r1413283368


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala:
##########
@@ -194,16 +212,16 @@ case class AdaptiveSparkPlanExec(
   }
 
   private def applyQueryPostPlannerStrategyRules(plan: SparkPlan): SparkPlan = 
{
-    applyPhysicalRules(
+    applyPhysicalRulesWithRuleContext(
       plan,
       
context.session.sessionState.adaptiveRulesHolder.queryPostPlannerStrategyRules,
-      Some((planChangeLogger, "AQE Query Post Planner Strategy Rules"))
-    )
+      Some((planChangeLogger, "AQE Query Post Planner Strategy Rules")))
   }
 
   @transient val initialPlan = context.session.withActive {
-    applyPhysicalRules(
-      applyQueryPostPlannerStrategyRules(inputPlan),
+    val planWithPostPlannerStrategy = 
applyQueryPostPlannerStrategyRules(inputPlan)
+    applyPhysicalRulesWithRuleContext(
+      planWithPostPlannerStrategy,

Review Comment:
   It is required. We need to propagate the configs to the next rules, so we 
should make code like:
   ```
   val x = withContext {}
   val y = withContext {}
   ```
   instead of 
   ```
   val x = withContext {
     withContext {}
   }
   ```
   
   I will make it more clearer.
   



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

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to