[fix](repeat) Preserve grouping ID after repeat decomposition#65968
Open
feiniaofeiafei wants to merge 1 commit into
Open
[fix](repeat) Preserve grouping ID after repeat decomposition#65968feiniaofeiafei wants to merge 1 commit into
feiniaofeiafei wants to merge 1 commit into
Conversation
fix groupingid exprid wrong [fix](fe) Keep decomposed grouping ID non-null Issue Number: None Related PR: None Problem Summary: DecomposeRepeatWithPreAggregation creates a new grouping-id slot for the residual Repeat. The default SlotReference constructor makes the slot nullable, but the Repeat backend writes grouping IDs directly to a non-nullable Int64 column. This caused a ColumnNullable-to-ColumnInt64 assertion failure when the rewrite ran. Create the new slot as non-nullable so its descriptor matches the Repeat operator contract. None - Test: Unit Test (run-fe-ut.sh --run DecomposeRepeatWithPreAggregationTest; build started, but the test environment previously could not allocate an FE HTTP port) - Behavior changed: Yes (prevents decomposed Repeat from producing a nullable internal grouping-id slot) - Does this need documentation: No fix
feiniaofeiafei
requested review from
924060929,
englefly,
morrySnow and
starocean999
as code owners
July 23, 2026 12:12
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29404 ms |
Contributor
TPC-DS: Total hot run time: 176857 ms |
Contributor
ClickBench: Total hot run time: 24.89 s |
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?
Related PR: #59116
DecomposeRepeatWithPreAggregationdropped the internalGROUPING_IDcolumn and recalculated IDs after removing the largest grouping set. This breaks upper plans that referenceGROUPING_ID, and changes the original grouping-ID semantics.This PR preserves original grouping-ID values for the residual Repeat, appends the removed grouping set’s original ID to the direct branch, and keeps the internal slot through the rewritten
ProjectandUnion.It also creates the new residual grouping-ID slot as non-nullable, matching the BE Repeat operator’s
ColumnInt64requirement and fixing theColumnNullablecast failure.Release note
Fix internal
GROUPING_IDhandling after Repeat decomposition.Check List
RepeatTestpassed.