Skip to content

branch-3.1: [Bug](distinct) fix distinct function with over return error result #51875 - #52314

Merged
morrySnow merged 1 commit into
branch-3.1from
auto-pick-51875-branch-3.1
Jun 27, 2025
Merged

branch-3.1: [Bug](distinct) fix distinct function with over return error result #51875#52314
morrySnow merged 1 commit into
branch-3.1from
auto-pick-51875-branch-3.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #51875

@dataroaringdataroaring left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…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)
```
@dataroaring
dataroaringforce-pushed the auto-pick-51875-branch-3.1 branch from e0ecf7d to 2c7f025CompareJune 26, 2025 02:19
@dataroaring

Copy link
Copy Markdown
Contributor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 0.00% (0/7) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage41.95% (11323/26989)
Line Coverage32.63% (96825/296745)
Region Coverage31.79% (50106/157609)
Branch Coverage28.46% (25952/91172)

@morrySnow
morrySnow merged commit 976b4d6 into branch-3.1Jun 27, 2025
@github-actions
github-actionsBot deleted the auto-pick-51875-branch-3.1 branch June 27, 2025 05:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dataroaring@doris-robot@morrySnow@zhangstar333