Skip to content

Conversation

@zddr
Copy link
Contributor

@zddr zddr commented Nov 14, 2025

cherry-pick: #56423

The main changes are as follows:
- If the MTMV is in a schema change state, recheck whether the
materialized view's SQL statement meets the requirements before
refreshing, and check whether the PCT table has changed.
- Add a data structure in the StatementContext to store the tables and
views directly depended on in the plan.
- Add a data structure to store the relationship between materialized
views and views.
- The location for adding filter conditions during partition refresh has
been moved to CheckPolicy, as the previous location could only access
the parsed plan.
- Clear the snapshot information of the materialized view when a view is
deleted or modified.

# Conflicts:
#	fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java
#	fe/fe-core/src/main/java/org/apache/doris/job/extensions/mtmv/MTMVTask.java
#	fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVRewriteUtil.java
#	fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateMTMVInfo.java
@zddr zddr requested a review from yiguolei as a code owner November 14, 2025 02:59
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zddr zddr marked this pull request as draft November 14, 2025 02:59
@zddr
Copy link
Contributor Author

zddr commented Nov 14, 2025

run buildall

@zddr zddr changed the title [feature](mtmv)create mtmv can use view (#56423) branch-4.0:[feature](mtmv)create mtmv can use view (#56423) Nov 14, 2025
@zddr
Copy link
Contributor Author

zddr commented Nov 14, 2025

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 77.25% (258/334) 🎉
Increment coverage report
Complete coverage report

@zddr
Copy link
Contributor Author

zddr commented Nov 17, 2025

run external

@zddr
Copy link
Contributor Author

zddr commented Nov 17, 2025

run cloud_p0

@zddr zddr marked this pull request as ready for review November 17, 2025 09:15
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Nov 18, 2025
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@yiguolei yiguolei merged commit c8f7784 into apache:branch-4.0 Nov 18, 2025
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants