-
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
[feature](Nereids): one side eager aggregation #28143
Conversation
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java
Show resolved
Hide resolved
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
logicalAggregate(innerLogicalJoin()) | ||
.when(agg -> agg.child().getOtherJoinConjuncts().isEmpty()) | ||
.whenNot(agg -> agg.child().children().stream().anyMatch(p -> p instanceof LogicalAggregate)) | ||
.when(agg -> agg.getGroupByExpressions().stream().allMatch(e -> e instanceof Slot)) |
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.
why not put "one side only" checking at the pre-checking stage?
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.
Not a big impact, change it together with the next PR
Count oldTopCnt = (Count) ((Alias) ne).child(); | ||
|
||
Slot slot = (Slot) oldTopCnt.child(0); | ||
if (leftCntSlotToOutput.containsKey(slot)) { |
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.
would we do some pre-processing ahead, such as judge which side will push down, and at this point, we just do the transformation without the additional 'if-else'?
logicalAggregate(innerLogicalJoin()) | ||
.when(agg -> agg.child().getOtherJoinConjuncts().isEmpty()) | ||
.whenNot(agg -> agg.child().children().stream().anyMatch(p -> p instanceof LogicalAggregate)) | ||
.when(agg -> { |
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.
some as the above comments, do 'one side only' judgment ahead here?
Sum oldTopSum = (Sum) ((Alias) ne).child(); | ||
|
||
Slot slot = (Slot) oldTopSum.child(0); | ||
if (leftSumSlotToOutput.containsKey(slot)) { |
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.
some as the above comments, do the definite side push transformation where without 'if-else' by moving some pre-processing at former logic?
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
why a rbo not a cbo path? @jackwener |
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...