-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Optimizer] Eliminate the distinct #2045
Comments
I am investigating this issue. If you know some information about it, you can provide it. |
@jackwener check this issues #1315 @ic4y contribute this pr. |
talk with @jackwener and @ic4y ; |
During I rewrite the plan for eliminating the distinct, there are some problem I can't figure out. Need to wait to I learn more and then try again. |
Now the target is rewrite from | initial_logical_plan | Projection: #Max(DISTINCT test.c1)
| | Aggregate: groupBy=[[]], aggr=[[Max(DISTINCT #test.c1)]]
| | TableScan: test projection=None to | initial_logical_plan | Projection: #Max(DISTINCT test.c1)
| | Projection: #Max(#test.c1) AS Max(DISTINCT test.c1)
| | Aggregate: groupBy=[[]], aggr=[[Max(#test.c1)]]
| | TableScan: test projection=None instead of | logical_plan | Projection: #Max(DISTINCT test.c1)
| | Projection: #Max(alias1) AS Max(DISTINCT test.c1)
| | Aggregate: groupBy=[[]], aggr=[[Max(#alias1)]]
| | Aggregate: groupBy=[[#test.c1 AS alias1]], aggr=[[]]
| | Aggregate: groupBy=[[#test.c1 AS alias1]], aggr=[[]]
| | TableScan: test projection=Some([0]) |
SingleDistinctAggregationToGroupBy
rule cause some strange change
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Describe the solution you'd like
I think
max/min
don't need the rewrite, but need to eliminate the distinct.Describe alternatives you've considered
SingleDistinctAggregationToGroupBy
rule make the plan more complex.Additional context
None
The text was updated successfully, but these errors were encountered: