-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[opt](nereids) optimize limit on distinct aggregate #47570
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 31725 ms
|
TPC-DS: Total hot run time: 190829 ms
|
ClickBench: Total hot run time: 30.88 s
|
run p0 |
run cloud_p0 |
run buildall |
TPC-H: Total hot run time: 31611 ms
|
TPC-DS: Total hot run time: 190252 ms
|
ClickBench: Total hot run time: 30.7 s
|
run buildall |
TPC-H: Total hot run time: 31938 ms
|
TPC-DS: Total hot run time: 190696 ms
|
ClickBench: Total hot run time: 31.21 s
|
run cloud_p0 |
run feut |
run cloud_p0 |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
### What problem does this PR solve? if there is no aggregate-functions in aggregation output, the limit could be pushed down inside this aggregate. example: select a from T group by a limit 1 original plan: limit(1)->distinct_aggregate(global, limit=1)->distinct_aggregate(local)->scan after optimize: limit(1) -> distinct_aggregate(global, limit=1)->distinct_aggregate(local, limit=1)->scan this work is implemented in PhysicalPlanTranslator
### What problem does this PR solve? if there is no aggregate-functions in aggregation output, the limit could be pushed down inside this aggregate. example: select a from T group by a limit 1 original plan: limit(1)->distinct_aggregate(global, limit=1)->distinct_aggregate(local)->scan after optimize: limit(1) -> distinct_aggregate(global, limit=1)->distinct_aggregate(local, limit=1)->scan this work is implemented in PhysicalPlanTranslator
#47816) Cherry-picked from #47570 Co-authored-by: minghong <[email protected]>
What problem does this PR solve?
if there is no aggregate-functions in aggregation output, the limit could be pushed down inside this aggregate.
example: select a from T group by a limit 1
original plan: limit(1)->distinct_aggregate(global, limit=1)->distinct_aggregate(local)->scan
after optimize: limit(1) -> distinct_aggregate(global, limit=1)->distinct_aggregate(local, limit=1)->scan
this work is implemented in PhysicalPlanTranslator
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)