Uh oh!
There was an error while loading. Please reload this page.
[opt](nereids) support pushing down aggr distinct through join - #43380
Conversation
doris-robot
commented
Nov 6, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
7a772d1 to
29c1de5Comparexzj7019
commented
Nov 28, 2024
run buildall |
29c1de5 to
964514cComparexzj7019
commented
Nov 29, 2024
run buildall |
| .when(agg -> agg.child().child().getOtherJoinConjuncts().isEmpty()) | ||
| .when(agg -> !agg.isGenerated()) | ||
| .whenNot(agg -> agg.getAggregateFunctions().isEmpty()) | ||
| .whenNot(agg -> agg.child().children().stream().anyMatch(p -> p instanceof LogicalAggregate)) |
There was a problem hiding this comment.
agg -> agg.child().children().stream().anyMatch(p -> p instanceof LogicalAggregate) , this is always false.
There was a problem hiding this comment.
thx, should be changed to .whenNot(agg -> agg.child()
.child(0).children().stream().anyMatch(p -> p instanceof LogicalAggregate))
| leftFuncs.forEach(func -> { | ||
| Alias alias = func.alias("PDADT_" + func.getName()); | ||
| leftSlotToOutput.put((Slot) func.child(0), alias); | ||
| }); |
There was a problem hiding this comment.
map leftSlotToOutput value seems to be useless
964514c to
e99aa8cComparexzj7019
commented
Nov 29, 2024
run buildall |
PR approved by anyone and no changes requested. |
e99aa8c to
8076eb0Comparexzj7019
commented
Nov 29, 2024
run buildall |
xzj7019
commented
Nov 29, 2024
run cloud_p0 |
1 similar comment
xzj7019
commented
Dec 2, 2024
run cloud_p0 |
| public List<Rule> buildRules() { | ||
| return ImmutableList.of( | ||
| logicalAggregate(logicalProject(innerLogicalJoin())) | ||
| .when(agg -> agg.child().isAllSlots()) |
There was a problem hiding this comment.
agg.child().isAllSlots()
is this restriction too strong?
There was a problem hiding this comment.
aggr with distinct pushing down has special rewrite logic and restrict this case carefully by safety
| return ImmutableList.of( | ||
| logicalAggregate(logicalProject(innerLogicalJoin())) | ||
| .when(agg -> agg.child().isAllSlots()) | ||
| .when(agg -> agg.child().child().getOtherJoinConjuncts().isEmpty()) |
There was a problem hiding this comment.
"getOtherJoinConjuncts().isEmpty()"
how about remove this?
There was a problem hiding this comment.
leave this clean up task for the whole series of aggr pushing down rules
englefly
commented
Dec 2, 2024
why it is called oneSide? it could push down through both sides |
xzj7019
commented
Dec 2, 2024
run cloud_p0 |
8076eb0 to
b243038Comparexzj7019
commented
Dec 2, 2024
run buildall |
xzj7019
commented
Dec 2, 2024
run cloud_p0 |
bf3e09d to
5e048dbComparexzj7019
commented
Dec 2, 2024
run buildall |
c85ccfa to
9e4d53cComparexzj7019
commented
Dec 4, 2024
run buildall |
xzj7019
commented
Dec 4, 2024
run p0 |
1 similar comment
xzj7019
commented
Dec 4, 2024
run p0 |
PR approved by at least one committer and no changes requested. |
What problem does this PR solve?
support pushing down agg distinct through join on one side.
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Release note
None
Check List (For Reviewer who merge this PR)