Remove unnecessary projection in single_distinct_to_group_by
rule
#8086
Labels
enhancement
New feature or request
single_distinct_to_group_by
rule
#8086
Is your feature request related to a problem or challenge?
In
single_distinct_to_group_by
rule, we usedProjection
to make the schema consistent before and after optimization. TheProjection
just do theAlias
task and , so we can directly useAlias
in aggregate function to eliminateProjection
and make code more clear.Describe the solution you'd like
use
alias
instead ofprojection
insingle_distinct_to_group_by
rule.the only problem is use
alias
may case a display error in explain plan, see #8061 (comment).but the output column name is equal, see #8061 (comment)
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: