cloud-fan commented on code in PR #48789:
URL: https://github.com/apache/spark/pull/48789#discussion_r1849557703


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/RemoveRedundantProjects.scala:
##########
@@ -58,7 +58,8 @@ object RemoveRedundantProjects extends Rule[SparkPlan] {
           p.mapChildren(removeProject(_, false))
         }
       case op: TakeOrderedAndProjectExec =>
-        op.mapChildren(removeProject(_, false))
+        // TakeOrderedAndProjectExec requires keep column ordering if AQE is 
enabled.

Review Comment:
   ok, how about `aqeEnabled && op.projectList == op.child.output`?



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