maryannxue commented on a change in pull request #32816:
URL: https://github.com/apache/spark/pull/32816#discussion_r701922272



##########
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 code changes won't be reduced by much, but at least it won't 
"contaminate" the framework. Why does AQE framework has to be aware of this 
skew join rule specifically?




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

Reply via email to