You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "haohuaijin (via GitHub)" <gi...@apache.org> on 2023/11/08 05:12:27 UTC
[I] Remove unnecessary projection in `single_distinct_to_group_by` rule [arrow-datafusion]
haohuaijin opened a new issue, #8086:
URL: https://github.com/apache/arrow-datafusion/issues/8086
### Is your feature request related to a problem or challenge?
In `single_distinct_to_group_by` rule, we used [`Projection`](https://github.com/apache/arrow-datafusion/blob/0506a5cff2c61f289e805d9ecd222ce2f79e4097/datafusion/optimizer/src/single_distinct_to_groupby.rs#L236-L239) to make the schema consistent before and after optimization. The `Projection` just do the `Alias` task and , so we can directly use `Alias` in aggregate function to eliminate `Projection` and make code more clear.
### Describe the solution you'd like
use `alias` instead of `projection` in `single_distinct_to_group_by` rule.
the only problem is use `alias` may case a display error in explain plan, see https://github.com/apache/arrow-datafusion/pull/8061#discussion_r1383222931.
but the output column name is equal, see https://github.com/apache/arrow-datafusion/pull/8061#discussion_r1385972626
### 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-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Remove unnecessary projection in `single_distinct_to_group_by` rule [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #8086: Remove unnecessary projection in `single_distinct_to_group_by` rule
URL: https://github.com/apache/arrow-datafusion/issues/8086
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org