[BugFix] Prevent aggregate pushdown when group keys involve JSON type#68142
Merged
stephen-shelby merged 1 commit intoStarRocks:mainfrom Jan 21, 2026
Merged
Conversation
Signed-off-by: stephen <stephen5217@163.com>
|
@cursor review |
|
Contributor
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[FE Incremental Coverage Report]✅ pass : 4 / 4 (100.00%) file detail
|
kangkaisen
reviewed
Jan 20, 2026
...re/src/main/java/com/starrocks/sql/optimizer/rule/tree/pdagg/PushDownAggregateCollector.java
Show resolved
Hide resolved
kangkaisen
approved these changes
Jan 21, 2026
Seaven
approved these changes
Jan 21, 2026
Contributor
|
@Mergifyio backport branch-3.5 |
Contributor
|
@Mergifyio backport branch-4.0 |
Contributor
|
@Mergifyio backport branch-4.1 |
Contributor
✅ Backports have been createdDetails
|
Contributor
✅ Backports have been createdDetails
|
Contributor
✅ Backports have been createdDetails
|
Merged
24 tasks
Merged
24 tasks
Merged
24 tasks
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.



Why I'm doing:
Aggregate pushdown may rewrite DISTINCT/group-by expressions to their used columns when pushing below Project/Join.
For expressions that depend on a JSON column, this can end up pushing down an aggregate that groups by a JSON column, which is not supported in BE and fails at runtime with:
group by type JSON is not supported backend.What I'm doing:
PushDownAggregateCollectorto block aggregate pushdown when any group-key used column type cannot be grouped in BE (e.g. JSON).Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: