-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[opt](mtmv) Support limit or topN rewrite when materialized view contains limit or topN #55194
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
[opt](mtmv) Support limit or topN rewrite when materialized view contains limit or topN #55194
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
1c8c4a2 to
ebe67be
Compare
|
run buildall |
TPC-H: Total hot run time: 33959 ms |
TPC-DS: Total hot run time: 183937 ms |
ClickBench: Total hot run time: 32.38 s |
FE UT Coverage ReportIncrement line coverage |
ebe67be to
c6244ae
Compare
|
run buildall |
TPC-H: Total hot run time: 34117 ms |
TPC-DS: Total hot run time: 186734 ms |
ClickBench: Total hot run time: 33.04 s |
FE UT Coverage ReportIncrement line coverage |
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 34457 ms |
TPC-DS: Total hot run time: 186517 ms |
ClickBench: Total hot run time: 32.93 s |
aa43367 to
b355167
Compare
|
run buildall |
ClickBench: Total hot run time: 28.3 s |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
TPC-DS: Total hot run time: 190809 ms |
ClickBench: Total hot run time: 27.74 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
eb7bbf1 to
6e23e18
Compare
|
run buildall |
1b74bc0 to
581f44b
Compare
|
run buildall |
TPC-H: Total hot run time: 34465 ms |
TPC-DS: Total hot run time: 187826 ms |
ClickBench: Total hot run time: 27.75 s |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
TPC-H: Total hot run time: 34120 ms |
TPC-DS: Total hot run time: 186175 ms |
ClickBench: Total hot run time: 27.85 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
FE Regression Coverage ReportIncrement line coverage |
…ains limit or topN (#55194) Support limit or topN rewrite when materialized view contains limit or topN the doc pr is apache/doris-website#3059 such as mv def is as fllowing ```sql CREATE MATERIALIZED VIEW mv_with_limit BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders limit 4 offset 2; ``` query is as following which can be rewritten success by mv `mv_with_limit` above ```sql select o_orderdate, o_shippriority, o_comment from orders limit 2 offset 3; ``` another example: such as mv def is as fllowing ```sql CREATE MATERIALIZED VIEW mv_with_topN BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders order by o_orderkey limit 4 offset 2; ``` query is as following which can be rewritten success by mv `mv_with_topN` above ```sql select o_orderdate, o_shippriority, o_comment from orders order by o_orderkey limit 2 offset 5; ```
…ains limit or topN (apache#55194) Support limit or topN rewrite when materialized view contains limit or topN the doc pr is apache/doris-website#3059 such as mv def is as fllowing ```sql CREATE MATERIALIZED VIEW mv_with_limit BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders limit 4 offset 2; ``` query is as following which can be rewritten success by mv `mv_with_limit` above ```sql select o_orderdate, o_shippriority, o_comment from orders limit 2 offset 3; ``` another example: such as mv def is as fllowing ```sql CREATE MATERIALIZED VIEW mv_with_topN BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders order by o_orderkey limit 4 offset 2; ``` query is as following which can be rewritten success by mv `mv_with_topN` above ```sql select o_orderdate, o_shippriority, o_comment from orders order by o_orderkey limit 2 offset 5; ```
What problem does this PR solve?
Support limit or topN rewrite when materialized view contains limit or topN
the doc pr is apache/doris-website#3059
such as mv def is as fllowing
CREATE MATERIALIZED VIEW mv_with_limit BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders limit 4 offset 2;query is as following which can be rewritten success by mv
mv_with_limitaboveanother example:
such as mv def is as fllowing
CREATE MATERIALIZED VIEW mv_with_topN BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, o_shippriority, o_comment from orders order by o_orderkey limit 4 offset 2;query is as following which can be rewritten success by mv
mv_with_topNaboveIssue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)