Support no distinct count/max/min/sum aggregate in single_distinct_to_group_by
rule
#8123
Labels
enhancement
New feature or request
single_distinct_to_group_by
rule
#8123
Is your feature request related to a problem or challenge?
In current
single_distinct_to_group_by
rule, we only support all aggregate function are distinct aggregate.But if the no distinct aggregate is count/min/max/sum, we can also do same transform like in
single_distinct_to_group_by
before
after
Describe the solution you'd like
By write, we can improve the perfmance of distinct aggregate
Describe alternatives you've considered
No response
Additional context
https://www.querifylabs.com/blog/distinct-aggregation-optimization-in-apache-calcite-and-trino
https://github.com/apache/calcite/blob/96b05ee12f936ed057265072ff6a2de8ea0a249e/core/src/main/java/org/apache/calcite/rel/rules/AggregateExpandDistinctAggregatesRule.java#L286-L298
The text was updated successfully, but these errors were encountered: