alihan-synnada opened a new pull request, #13897: URL: https://github.com/apache/datafusion/pull/13897
## Which issue does this PR close? None ## Rationale for this change `maintains_input_order` helps with sort pushdown optimization. As explained in [`InputOrderMode` documentation](https://docs.rs/datafusion/latest/datafusion/physical_plan/enum.InputOrderMode.html#aggregations), given an ordering [a, b] and a grouping [b] (`Linear` mode), [a, b] will not be satisfied anymore. However, `Sorted` and `PartiallySorted` modes maintain the input order in aggregation. ## What changes are included in this PR? - Implement `maintains_input_order` for `AggregateExec` ## Are these changes tested? No, but I'm open to suggestions. I checked `BoundedWindowAggExec` for inspiration but it seems this behavior is tested in SQL logic tests. Sort pushdown is implemented for window operations, but not for aggregation. Therefore, I cannot use a similar test as of now, but it can be applied if/when sort pushdown is implemented for `AggregationExec` ## Are there any user-facing changes? None -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org