-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[fix] (mtmv) Fix topN rewrite by materialized view fail and cause rewrite result wrong #58406
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
base: master
Are you sure you want to change the base?
[fix] (mtmv) Fix topN rewrite by materialized view fail and cause rewrite result wrong #58406
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
1 similar comment
|
run buildall |
TPC-H: Total hot run time: 34260 ms |
TPC-DS: Total hot run time: 184119 ms |
ClickBench: Total hot run time: 27.37 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
5506df4 to
882f7ed
Compare
|
run buildall |
1 similar comment
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 34458 ms |
TPC-DS: Total hot run time: 184397 ms |
ClickBench: Total hot run time: 27.67 s |
FE Regression Coverage ReportIncrement line coverage |
52e8438 to
052067b
Compare
|
run buildall |
TPC-H: Total hot run time: 33750 ms |
FE UT Coverage ReportIncrement line coverage |
TPC-DS: Total hot run time: 182009 ms |
ClickBench: Total hot run time: 27.86 s |
052067b to
24a868b
Compare
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
TPC-H: Total hot run time: 33984 ms |
TPC-DS: Total hot run time: 182274 ms |
ClickBench: Total hot run time: 27.3 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
What problem does this PR solve?
This PR addresses two issues:
1 it stabilizes the regression tests for
topN_rewriteandlimit_rewrite, and2 it fixes a bug affecting negative test cases. For example, the following case should not be rewritten successfully but was incorrectly rewritten
CREATE MATERIALIZED VIEW mv BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdate, ps_partkey, l_orderkey from orders left join lineitem on l_orderkey = o_orderkey left join partsupp on ps_partkey = l_partkey and l_suppkey = ps_suppkey where o_orderdate > '2025-01-02' order by o_orderdate, l_orderkey, ps_partkey limit 8 offset 1;the query as following should not rewrite successfully
Issue Number: close #xxx
Related PR: #58018
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)