maryannxue commented on a change in pull request #29137:
URL: https://github.com/apache/spark/pull/29137#discussion_r456999534
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -108,7 +108,9 @@ case class AdaptiveSparkPlanExec(
@transient private val costEvaluator = SimpleCostEvaluator
@volatile private var currentPhysicalPlan =
- applyPhysicalRules(initialPlan, queryStagePreparationRules)
+ applyPhysicalRules(inputPlan, queryStagePreparationRules)
+
+ private val initialPlan = currentPhysicalPlan
Review comment:
nit: It would more intuitive to initialize `intialPlan` first:
```
@transient private val initialPlan =
applyPhysicalRules(inputPlan, queryStagePreparationRules)
@volatile private var currentPhysicalPlan = initialPlan
```
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]