jayzhan211 opened a new issue, #10455: URL: https://github.com/apache/datafusion/issues/10455
### Is your feature request related to a problem or challenge? While moving `count` to UDAF, I found that we need to call UDAF in the optimize rule [`single_distinct_to_groupby`](https://github.com/apache/arrow-datafusion/blob/main/datafusion/optimizer/src/single_distinct_to_groupby.rs). Similar to `ArrayFunctionRewriter`, we need to move the rule `single_distinct_to_groupby` out of the core. ### Describe the solution you'd like 1. Move common optimizer things to `optimizer-common` crate or `datafusion-expr` crate 2. Move `single_distinct_to_groupby` to `function-aggregate`. ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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.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