Uh oh!
There was an error while loading. Please reload this page.
[fix] (agg_strategy) fix result wrong when the multi_distinct_func and count distinct multi expr exists same time - #56271
Conversation
hello-stephen
commented
Sep 21, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
feiniaofeiafei
commented
Sep 21, 2025
run buildall |
hello-stephen
commented
Sep 21, 2025
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Sep 21, 2025
FE Regression Coverage ReportIncrement line coverage |
feiniaofeiafei
commented
Sep 22, 2025
run cloud_p0 |
hello-stephen
commented
Sep 22, 2025
FE Regression Coverage ReportIncrement line coverage |
feiniaofeiafei
commented
Sep 22, 2025
run buildall |
feiniaofeiafei
commented
Sep 22, 2025
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
hello-stephen
commented
Sep 22, 2025
FE Regression Coverage ReportIncrement line coverage |
| = ImmutableList.builderWithExpectedSize(aggOutput.size()); | ||
| for (NamedExpression output : aggOutput) { | ||
| Expression rewrittenExpr = output.rewriteDownShortCircuit( | ||
| e -> e instanceof MultiDistinction ? ((MultiDistinction) e).withMustUseMultiDistinctAgg(true) : e); | ||
| newAggOutputBuilder.add((NamedExpression) rewrittenExpr); | ||
| } | ||
| newAggOutputBuilder.addAll(aggOutput); | ||
| ImmutableList<NamedExpression> normalizedAggOutput = newAggOutputBuilder.build(); |
There was a problem hiding this comment.
normalizedAggOutput always equals to aggOutput? just use aggOutput
feiniaofeiafei
commented
Sep 22, 2025
run buildall |
doris-robot
commented
Sep 22, 2025
TPC-H: Total hot run time: 1534 ms |
doris-robot
commented
Sep 22, 2025
TPC-DS: Total hot run time: 2823 ms |
doris-robot
commented
Sep 22, 2025
ClickBench: Total hot run time: 0.06 s |
hello-stephen
commented
Sep 22, 2025
FE Regression Coverage ReportIncrement line coverage |
feiniaofeiafei
commented
Sep 22, 2025
run cloud_p0 |
feiniaofeiafei
commented
Sep 22, 2025
run nonconcurrent |
hello-stephen
commented
Sep 22, 2025
FE Regression Coverage ReportIncrement line coverage |
feiniaofeiafei
commented
Sep 22, 2025
run nonConcurrent |
hello-stephen
commented
Sep 22, 2025
FE Regression Coverage ReportIncrement line coverage |
PR approved by at least one committer and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
…d count distinct multi expr exists same time (#56271) ### What problem does this PR solve? Related PR: #54079 Problem Summary: 1. Added a check for multi_distinct_count(a,b) in the MultiDistinctCount constructor to prevent the use of multiple columns. Because BE doesn't report an error in this case, it only uses the first argument of the multi_distinct function, resulting in incorrect results. 2. In scenarios without a group by key, when multi_distinct_func and count(distinct a,b) appear together, the original code converts count(distinct a,b) to multi_distinct_count(a), resulting in incorrect results. The correct approach is to use multi-stage splitting when count distinct multi_expr appears. 3. Removed the mustUseMultiDistinct flag. This flag is useless.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #54079
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)