branch-2.1: [fix](mtmv) Fix refresh materialized view fail when mv def contains cte #44857#45021
Closed
github-actions[bot] wants to merge 1 commit intobranch-2.1from
Closed
branch-2.1: [fix](mtmv) Fix refresh materialized view fail when mv def contains cte #44857#45021github-actions[bot] wants to merge 1 commit intobranch-2.1from
github-actions[bot] wants to merge 1 commit intobranch-2.1from
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
…te (#44857) ### What problem does this PR solve? Related PR: #33988 Problem Summary: if mv def contain cte and is partition mv, such as following: CREATE MATERIALIZED VIEW mv_name BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL PARTITION BY (l_shipdate) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS WITH scan_data_cte as ( select t1.l_shipdate, t1.L_LINENUMBER, orders.O_CUSTKEY, l_suppkey from (select * from lineitem where L_LINENUMBER > 1) t1 left join orders on t1.L_ORDERKEY = orders.O_ORDERKEY ) SELECT * FROM scan_data_cte; if run refresh cmd as following, this would fail, throw exception `no partition for this tuple`, this pr fix this refresh materialized view mv_name partitions(p_20231210_20231211); ### Release note Fix refresh materialized view fail when mv def contains cte
5732812 to
290532e
Compare
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.
Cherry-picked from #44857