-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Bug](distinct) fix distinct function with over return error result #51875
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 33740 ms |
TPC-DS: Total hot run time: 192588 ms |
ClickBench: Total hot run time: 29.38 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 33823 ms |
TPC-DS: Total hot run time: 185993 ms |
ClickBench: Total hot run time: 29.28 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
7a8f4bd to
c578792
Compare
|
run buildall |
TPC-H: Total hot run time: 33902 ms |
TPC-DS: Total hot run time: 185985 ms |
ClickBench: Total hot run time: 29.72 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
ClickBench: Total hot run time: 29.69 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
HappenLee
left a comment
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
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…51875) ### What problem does this PR solve? Problem Summary: before the result is not correctly, as after insert the rows, should reset all state of nested function. So the result of the next line will not be affected by the previous one ``` mysql> select id, v1, multi_distinct_group_concat(v2) over() from multi; +------+------+----------------------------------------+ | id | v1 | multi_distinct_group_concat(v2) over() | +------+------+----------------------------------------+ | 3 | 1 | a | | 1 | 1 | a,a | | 1 | 1 | a,a,a | | 2 | 1 | a,a,a,a | +------+------+----------------------------------------+ 4 rows in set (0.21 sec) mysql> select id, v1, multi_distinct_sum(v1) over() from multi; +------+------+-------------------------------+ | id | v1 | multi_distinct_sum(v1) over() | +------+------+-------------------------------+ | 1 | 1 | 1 | | 1 | 1 | 2 | | 2 | 1 | 3 | | 3 | 1 | 4 | +------+------+-------------------------------+ 4 rows in set (0.06 sec) ```
…ror result apache#51875 (apache#52312) Cherry-picked from apache#51875 Co-authored-by: zhangstar333 <zhangsida@selectdb.com>
What problem does this PR solve?
Problem Summary:
before the result is not correctly, as after insert the rows, should reset all state of nested function.
So the result of the next line will not be affected by the previous one
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)