neilconway opened a new issue, #25417: URL: https://github.com/apache/datafusion/issues/25417
### Describe the bug A DISTINCT aggregate call that passes the same expression as more than one argument fails during optimization with an internal error. ### To Reproduce ``` -- OK SELECT corr(DISTINCT x, y) FROM (VALUES (1.0, 2.0), (2.0, 5.0), (3.0, 4.0)) AS t(x, y); -- Fails SELECT corr(DISTINCT x, x) FROM (VALUES (1.0, 2.0), (2.0, 5.0), (3.0, 4.0)) AS t(x, y); Optimizer rule 'single_distinct_aggregation_to_group_by' failed caused by Internal error: Assertion failed: args.len() == 1 (left: 2, right: 1): DISTINCT aggregate should have exactly one argument. ``` ### Expected behavior _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: [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]
