[fix](nereids) Fix pre-aggregation context leakage across join branches#63357
Open
felixwluo wants to merge 1 commit into
Open
[fix](nereids) Fix pre-aggregation context leakage across join branches#63357felixwluo wants to merge 1 commit into
felixwluo wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
/review |
Contributor
There was a problem hiding this comment.
No blocking issues found in the actual PR diff.
Checkpoint conclusions:
- Goal/test: The change targets pre-aggregation context leakage from an aggregate subquery into a sibling normal scan. The added
retainAll(logicalAggregate.child().getInputRelations())keeps aggregate metadata scoped to the aggregate child, and the regression test checks the expected mixed PREAGGREGATION OFF/ON plan shape. - Scope: The implementation is small and focused, touching only the context IDs at the aggregate boundary plus one regression case.
- Concurrency/lifecycle/config/compatibility/persistence: Not applicable; this is planner rewrite state local to one optimization pass and adds no persistent or protocol state.
- Parallel paths: The affected path is the Nereids
SetPreAggStatusrewrite. Existing duplicate/unique/MoW early exits remain unchanged. - Tests: Regression coverage was added for the reported same-table join-with-aggregate-subquery pattern. I did not run the regression suite in this review environment.
- Observability/performance: No new observability is needed. The added set intersection is small relative to planning work and is not on BE execution hot paths.
- User focus: No additional user-provided focus points were supplied.
Member
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 31250 ms |
Contributor
TPC-DS: Total hot run time: 170602 ms |
Contributor
FE Regression Coverage ReportIncrement line coverage |
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?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
for agg_keys tables, Nereids may incorrectly set PREAGGREGATION: ON for a normal scan in a join when the other join branch contains an aggregate subquery.
example sql
root cause:
"
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)