maryannxue commented on a change in pull request #32816:
URL: https://github.com/apache/spark/pull/32816#discussion_r701124652
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -640,14 +668,12 @@ case class AdaptiveSparkPlanExec(
* Re-optimize and run physical planning on the current logical plan based
on the latest stats.
*/
private def reOptimize(
- logicalPlan: LogicalPlan): (SparkPlan, LogicalPlan) =
context.qe.withCteMap {
+ logicalPlan: LogicalPlan): (Seq[SparkPlan], LogicalPlan) =
context.qe.withCteMap {
logicalPlan.invalidateStatsCache()
val optimized = optimizer.execute(logicalPlan)
val sparkPlan =
context.session.sessionState.planner.plan(ReturnAnswer(optimized)).next()
- val newPlan = applyPhysicalRules(
- sparkPlan,
- preprocessingRules ++ queryStagePreparationRules,
- Some((planChangeLogger, "AQE Replanning")))
+ val optimizedPhysicalPlan = prepareQueryStages(sparkPlan, false)
Review comment:
The only difference here is caused by the skew join rule + EnsureReq, so
why can't we wrap the decision making logic into the skew join rule itself?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]