[fix](mtmv) Fix mv rewrite result wrong if mv on unique table#39171
Merged
morrySnow merged 4 commits intoapache:masterfrom Aug 20, 2024
Merged
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Member
Author
|
run buildall |
TPC-H: Total hot run time: 39401 ms |
TPC-DS: Total hot run time: 201102 ms |
ClickBench: Total hot run time: 31.12 s |
morrySnow
previously approved these changes
Aug 12, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
be6cac8 to
d70c2e3
Compare
Member
Author
|
run buildall |
TPC-H: Total hot run time: 38569 ms |
1ed25a9 to
0139690
Compare
Member
Author
|
run buildall |
TPC-H: Total hot run time: 38421 ms |
TPC-H: Total hot run time: 37957 ms |
TPC-DS: Total hot run time: 196595 ms |
ClickBench: Total hot run time: 31.13 s |
morrySnow
approved these changes
Aug 20, 2024
starocean999
approved these changes
Aug 20, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
dataroaring
pushed a commit
that referenced
this pull request
Aug 26, 2024
if table is unique model, and create sync materialized view on it
such as mv def is as following:
select l_orderkey, l_linenumber, l_partkey, l_suppkey, l_shipdate,
substring(concat(l_returnflag, l_linestatus), 1)
from lineitem_2_uniq;
if query is as following:
select l_orderkey, l_suppkey,
substring(concat(l_returnflag, l_linestatus), 1)
from lineitem_2_uniq;
delete from lineitem_2_uniq_mow where l_orderkey = 1;
the result is
+------------+-----------+--------------------------------------------------------------+
| l_orderkey | l_suppkey | substring(concat(l_returnflag, l_linestatus), 1, 2147483647) |
+------------+-----------+--------------------------------------------------------------+
| 3 | 2 | ko |
| 3 | 2 | ko |
| 2 | 1 | ok |
| NULL | 3 | ok |
| 1 | 1 | NULL |
| 1 | NULL | NULL |
| 1 | 2 | NULL |
+------------+-----------+--------------------------------------------------------------+
the right result should be
+------------+-----------+--------------------------------------------------------------+
| l_orderkey | l_suppkey | substring(concat(l_returnflag, l_linestatus), 1, 2147483647) |
+------------+-----------+--------------------------------------------------------------+
| 2 | 1 | ok |
| 3 | 2 | ko |
| 3 | 2 | ko |
| NULL | 3 | ok |
+------------+-----------+--------------------------------------------------------------+
Closed
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.
Proposed changes
if table is unique model, and create sync materialized view on it
such as mv def is as following:
if query is as following:
delete from lineitem_2_uniq_mow where l_orderkey = 1;the result is
the right result should be
the pr fix this