mustafasrepo commented on code in PR #10061:
URL: 
https://github.com/apache/arrow-datafusion/pull/10061#discussion_r1565661123


##########
datafusion/core/src/physical_optimizer/optimizer.rs:
##########
@@ -89,6 +90,8 @@ impl PhysicalOptimizer {
             // as that rule may inject other operations in between the 
different AggregateExecs.
             // Applying the rule early means only directly-connected 
AggregateExecs must be examined.
             Arc::new(LimitedDistinctAggregation::new()),
+            // Run once before PartialFinalAggregation is rewritten to ensure 
the rule is applied correctly
+            Arc::new(OptimizeAggregateOrder::new()),

Review Comment:
   I think we can remove this rule from here. Using it only in below place 
should be enough.



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

Reply via email to