[Enhancement] Reject FORCE refresh on INCREMENTAL/AUTO materialized views#72336
Merged
Astralidea merged 1 commit intoApr 30, 2026
Merged
Conversation
…iews Per the IMV V1 PRD, the FORCE clause on REFRESH MATERIALIZED VIEW must be rejected for materialized views with refresh_mode=INCREMENTAL (and refresh_mode=AUTO, which shares the same code path via isIncrementalOrAuto()). FORCE is only meaningful for the legacy PCT mode where it triggers a full re-materialization; for incremental MVs the recovery path is drop-and-recreate. Production: - MaterializedViewAnalyzer.visitRefreshMaterializedViewStatement: in the same block that already rejects partition-level refresh on INCREMENTAL/AUTO MVs, add a FORCE rejection with a clear error message that points users at the drop-and-recreate workflow. Tests: - testIncrementalRefreshModeRejectsForceRefresh: create a PCT MV via the SQL path (no Iceberg dependency), flip the persisted refresh_mode to "incremental", then assert that REFRESH ... FORCE is rejected with the expected message. - testPctRefreshModeAllowsForceRefresh: regression guard that PCT MVs still accept the FORCE clause. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Youngwb <yangwenbo_mailbox@163.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Contributor
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[FE Incremental Coverage Report]✅ pass : 4 / 4 (100.00%) file detail
|
Contributor
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
kangkaisen
approved these changes
Apr 30, 2026
Astralidea
approved these changes
Apr 30, 2026
Contributor
|
@Mergifyio backport branch-4.1 |
Contributor
✅ Backports have been createdDetails
Cherry-pick of 75a5d6e has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Merged
24 tasks
Hyper-FF
pushed a commit
to Hyper-FF/starrocks
that referenced
this pull request
Apr 30, 2026
…iews (StarRocks#72336) Signed-off-by: Youngwb <yangwenbo_mailbox@163.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
robd003
pushed a commit
to robd003/starrocks
that referenced
this pull request
May 6, 2026
…iews (StarRocks#72336) Signed-off-by: Youngwb <yangwenbo_mailbox@163.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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:
What I'm doing:
the FORCE clause on REFRESH MATERIALIZED VIEW must be rejected for materialized views with refresh_mode=INCREMENTAL (and refresh_mode=AUTO, which shares the same code path via isIncrementalOrAuto()). FORCE is only meaningful for the legacy PCT mode where it triggers a full re-materialization; for incremental MVs the recovery path is drop-and-recreate.
Production:
Tests:
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: