cloud-fan commented on a change in pull request #33140:
URL: https://github.com/apache/spark/pull/33140#discussion_r662754669
##
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##
@@ -122,7 +123,8 @@ case class AdaptiveSparkPlanExec(
val origins = inputPlan.collect {
case s: ShuffleExchangeLike => s.shuffleOrigin
}
-val allRules = queryStageOptimizerRules ++ postStageCreationRules
Review comment:
I think we need to revisit all the phases in the AQE loop, and think
about which phases need to accept custom rules for columnar execution.
At the beginning, the input plan comes in, we run `state preparation rules`
first, to get the initial plan which contains shuffles. Then we create query
stages on leaf shuffles, and submit query stages after running `stage
optimization rules` and `post stage creation rules`.
If one query stage finishes, we start the loop:
1. generate the logical plan with query stage result
2. re-optimize the logical plan by running `AQEOptimizer`, planner and
`state preparation rules`
3. compare the cost, pick the re-optimized plan or the old plan according to
the cost
4. create more stages and submit them, wait for next query stage to finish
At the end, we need to optimize the final stage by running `stage
optimization rules` and `post stage creation rules`.
It looks to me that, we can put the columnar execution custom rules in `post
stage creation rules`?
--
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