maryannxue commented on a change in pull request #29134:
URL: https://github.com/apache/spark/pull/29134#discussion_r456199456
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala
##########
@@ -374,12 +374,14 @@ case class AdaptiveSparkPlanExec(
}
private def newQueryStage(e: Exchange): QueryStageExec = {
- val optimizedPlan = applyPhysicalRules(e.child, queryStageOptimizerRules)
+ // apply optimizer rules to the Exchange node and its children, allowing
plugins to be
+ // able to replace the Exchange node itself
+ val optimizedPlan = applyPhysicalRules(e, queryStageOptimizerRules)
Review comment:
How can we guarantee the top node is still an Exchange after applying
physical 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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]