Repository navigation
[fix](mtmv) Preserve origin statement in refresh task - #68272
Merged
yiguolei merged 1 commit intoSep 21, 2026
Merged
Conversation
### What problem does this PR solve? Problem Summary: Internal MTMV refresh tasks could construct a StatementContext and LogicalPlanAdapter without an origin statement. StmtExecutor then copied the null adapter origin back into the context. If CBO candidate costing failed, CostBasedRewriteJob dereferenced that missing origin while logging and raised an unrelated NullPointerException. Initialize refresh planning with the MV query, propagate the same origin through the adapter, and make the CBO failure log tolerate internal contexts without an origin statement. ### Release note Fix internal materialized view refresh failures caused by a missing origin statement. ### Check List (For Author) - Test: Unit Test - Behavior changed: No - Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Sep 21, 2026
morningman
added a commit
that referenced
this pull request
Sep 24, 2026
### What problem does this PR solve? Issue Number: None (branch pick) Related PR: #67490, #68141, #66963, #68269 Problem Summary: Pick the four merged `incremental-computation` PRs that do not have the `incremental-computation-picked` label into `branch-incremental-computation`, in their master merge order: 1. #67490: prevent a local exchange under a serial parent pipeline. 2. #68141: manage MTMV planning caches through a bounded global LRU cache and expose cache statistics. 3. #66963: restrict HLL, QUANTILE_STATE, and AGG_STATE columns to Aggregate Key tables by default, with a temporary compatibility setting. 4. #68269: preserve the origin statement for internal MTMV refreshes and parse `SET_VAR` hints with the refresh context installed. Dependency check: #33262, referenced by #68141, is already an ancestor of this branch. #66664 is an open related row-binlog fix rather than a code prerequisite for #66963. #68272 is the corresponding branch-4.1 fix for #68269, not a master prerequisite. No additional PR needed picking. ### Release note Bring the four fixes and MTMV cache management change above to the incremental computation branch. In particular, non-Aggregate Key tables now reject new HLL, QUANTILE_STATE, and AGG_STATE columns by default; incremental MTMV refreshes and dry runs can parse MV queries with `SET_VAR` hints. ### Check List (For Author) - Test: - `./build.sh --fe` (passed, including Checkstyle with 0 violations) - Focused `./run-fe-ut.sh --run ...` across 13 changed and related test classes (356 tests passed, 0 failures/errors/skips) - SQL regression tests were not run; this worktree has no BE cluster. - Behavior changed: Yes, as described in the source PRs and release note. - Does this need documentation: No; the source PRs do not require a documentation PR. --------- Co-authored-by: Mryange <[email protected]> Co-authored-by: xy720 <[email protected]> Co-authored-by: Luwei <[email protected]> Co-authored-by: morrySnow <[email protected]>
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: None
Related PR: #68269
Problem Summary:
Internal MTMV refresh tasks could construct a StatementContext and LogicalPlanAdapter without an origin statement. StmtExecutor then copied the null adapter origin back into the context. If CBO candidate costing failed, CostBasedRewriteJob dereferenced that missing origin while logging and raised an unrelated NullPointerException.
This change initializes refresh planning with the MV query, propagates the same origin through the adapter, and makes the CBO failure log tolerate internal contexts without an origin statement.
Release note
Fix internal materialized view refresh failures caused by a missing origin statement.
Check List (For Author)