-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix](mtmv) Fix compensate union all wrongly when query rewrite by materialized view #40803
[fix](mtmv) Fix compensate union all wrongly when query rewrite by materialized view #40803
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 42642 ms
|
TPC-DS: Total hot run time: 199281 ms
|
ClickBench: Total hot run time: 30.96 s
|
run buildall |
TPC-H: Total hot run time: 43317 ms
|
TPC-H: Total hot run time: 41301 ms
|
TPC-DS: Total hot run time: 199427 ms
|
ClickBench: Total hot run time: 32.93 s
|
&& ((SlotReference) expr).isColumnFromTable() | ||
&& ((SlotReference) expr).getColumn().get().getName().equals(relatedCol)).isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check table name too
fd27e07
to
492ec60
Compare
run buildall |
TPC-H: Total hot run time: 41754 ms
|
TPC-DS: Total hot run time: 194879 ms
|
ClickBench: Total hot run time: 33.13 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…terialized view (#40803) ## Proposed changes This is brought by #36056 Not all query after rewritten successfully can compensate union all Such as: mv def sql is as following, partition column is a ```sql select a, b, count(*) from t1 group by a, b ``` Query is as following: ```sq select count(*) from t1 ``` the result is +----------+ | count(*) | +----------+ | 24 | +----------+ after rewritten by materialized view successfully If mv part partition is invalid, can not compensate union all, because result is wrong after compensate union all. +----------+ | count(*) | +----------+ | 24 | | 3 | +----------+ This pr fix this.
…terialized view (apache#40803) This is brought by apache#36056 Not all query after rewritten successfully can compensate union all Such as: mv def sql is as following, partition column is a ```sql select a, b, count(*) from t1 group by a, b ``` Query is as following: ```sq select count(*) from t1 ``` the result is +----------+ | count(*) | +----------+ | 24 | +----------+ after rewritten by materialized view successfully If mv part partition is invalid, can not compensate union all, because result is wrong after compensate union all. +----------+ | count(*) | +----------+ | 24 | | 3 | +----------+ This pr fix this.
Proposed changes
This is brought by #36056
Not all query after rewritten successfully can compensate union all
Such as:
mv def sql is as following, partition column is a
Query is as following:
the result is
+----------+
| count(*) |
+----------+
| 24 |
+----------+
after rewritten by materialized view successfully
If mv part partition is invalid, can not compensate union all, because result is wrong after
compensate union all.
+----------+
| count(*) |
+----------+
| 24 |
| 3 |
+----------+
This pr fix this.