jacktengg opened a new pull request, #70533: URL: https://github.com/apache/doris/pull/70533
### What problem does this PR solve? Issue Number: N/A Related PR: #68880 Backport of #68880 to `branch-4.2`, cherry-picked from `0f987b6d24314a28a968449c718a008c8709a0fd` with source attribution (`-x`). This branch is based directly on `apache/doris:branch-4.2` and is independent of the other backports. Repeated grouping keys can refer to the same input column. On 4.2, moving a column out of the input block while constructing pass-through output can leave later references without the original column. Share the evaluated immutable key columns in both pass-through paths, preserving repeated keys and retained output ownership. ### Branch-4.2 adaptations Applied the shared-column fix to the 4.2 IColumn::mutate/move implementation. Added only the repeated-key tests from this PR, without importing unrelated master-only memory-limit tests. Removed the regression setup for the master-only distinct memory-budget behavior: 4.2 uses the reduction ratio/low-memory mode, and the unit tests force pass-through explicitly. ### Release note Fix incorrect handling of repeated grouping keys in distinct streaming aggregation pass-through. ### Validation - Reviewed both fresh-output and reused-output paths against the 4.2 column ownership behavior. - Verified that the added parameterized unit tests cover nullable output, retained output ownership, repeated keys, and transition from deduplication. - Whitespace/conflict-marker checks passed (allowing the standard trailing blank line in regression `.out` files). - Exactly one backport commit on top of `7523405f6aa8e9df3d110eb432fed1ff6e1c3418`; clean worktree. - Full builds, unit tests and SQL regression suites were not run for this backport on this macOS host. The local environment lacks the required JDK 17/full Doris build dependencies; the offline Maven attempt could not resolve the required BOMs. Submodules remain uninitialized. BE repeated-key unit tests and EXCEPT/INTERSECT/UNION/GROUP BY regression coverage from the original PR are included. ### Check List (For Author) - Test: existing upstream unit/regression coverage included; local checks and execution limits are listed above. - Behavior changed: Yes; restores correct behavior as described above. - Does this need documentation: No. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
