[fix](nereids) fix distinct window compute wrong result#48987
Closed
924060929 wants to merge 8 commits intoapache:masterfrom
Closed
[fix](nereids) fix distinct window compute wrong result#48987924060929 wants to merge 8 commits intoapache:masterfrom
924060929 wants to merge 8 commits intoapache:masterfrom
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32649 ms |
TPC-DS: Total hot run time: 184344 ms |
ClickBench: Total hot run time: 31.73 s |
85708a8 to
be6aeb6
Compare
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32423 ms |
TPC-DS: Total hot run time: 192680 ms |
ClickBench: Total hot run time: 31.36 s |
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 13, 2025
fix distinct window compute wrong result, introduced by apache#14397 ```sql select distinct sum(value) over(partition by id) from ( select 100 value, 1 id union all select 100, 2 )a; +----------------------------------+ | sum(value) over(partition by id) | +----------------------------------+ | 100 | | 100 | +----------------------------------+ ```
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 13, 2025
fix distinct window compute wrong result, introduced by apache#14397 ```sql select distinct sum(value) over(partition by id) from ( select 100 value, 1 id union all select 100, 2 )a; +----------------------------------+ | sum(value) over(partition by id) | +----------------------------------+ | 100 | | 100 | +----------------------------------+ ```
This was referenced Mar 13, 2025
TPC-H: Total hot run time: 32408 ms |
TPC-DS: Total hot run time: 191602 ms |
ClickBench: Total hot run time: 31.25 s |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32274 ms |
Contributor
Author
|
run buildall |
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 13, 2025
fix distinct window compute wrong result, introduced by apache#14397 ```sql select distinct sum(value) over(partition by id) from ( select 100 value, 1 id union all select 100, 2 )a; +----------------------------------+ | sum(value) over(partition by id) | +----------------------------------+ | 100 | | 100 | +----------------------------------+ ```
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 13, 2025
fix distinct window compute wrong result, introduced by apache#14397 ```sql select distinct sum(value) over(partition by id) from ( select 100 value, 1 id union all select 100, 2 )a; +----------------------------------+ | sum(value) over(partition by id) | +----------------------------------+ | 100 | | 100 | +----------------------------------+ ```
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32064 ms |
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 13, 2025
fix distinct window compute wrong result, introduced by apache#14397 ```sql select distinct sum(value) over(partition by id) from ( select 100 value, 1 id union all select 100, 2 )a; +----------------------------------+ | sum(value) over(partition by id) | +----------------------------------+ | 100 | | 100 | +----------------------------------+ ```
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 32211 ms |
TPC-DS: Total hot run time: 185145 ms |
ClickBench: Total hot run time: 30.69 s |
yiguolei
pushed a commit
that referenced
this pull request
Mar 14, 2025
morrySnow
reviewed
Mar 14, 2025
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ProjectToGlobalAggregate.java
Show resolved
Hide resolved
| sql "select distinct sum(value) over(partition by id) from (select 100 value, 1 id union all select 100, 2)a" | ||
| result([[100L]]) | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
add more case to cover all if branch in rules, such as
- qualify with alias
- qualify with new window function
- qualify with window function which has exsited in project list
- having
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ProjectToGlobalAggregate.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/ProjectToGlobalAggregate.java
Show resolved
Hide resolved
...re/src/main/java/org/apache/doris/nereids/rules/analysis/ReplaceExpressionByChildOutput.java
Show resolved
Hide resolved
924060929
added a commit
to 924060929/incubator-doris
that referenced
this pull request
Mar 14, 2025
…result (apache#48987) (apache#49010)" This reverts commit 7123bbf.
924060929
added a commit
that referenced
this pull request
Mar 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
fix distinct window compute wrong result, introduced by #14397
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)