-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improvement](mtmv) Support rewrite by materialized view when join has other join conjuncts #41674
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
[improvement](mtmv) Support rewrite by materialized view when join has other join conjuncts #41674
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
3 similar comments
|
run buildall |
|
run buildall |
|
run buildall |
zfr9527
left a comment
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.
- Can the two "on" conditions exchange positions?
- Can complex expressions be used?
- If different tables have the same column names, is it still correct?
- Case sensitivity of table/column names.
- Can aggregate functions be used?
- Does it support full build or partition build?
- Combinations of different join types.
|
PR approved by anyone and no changes requested. |
9e0b44a to
b9b70b3
Compare
|
run buildall |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
|
run buildall |
zfr9527
left a comment
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.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
…s other join conjuncts (#41674) Support rewrite by materialized view when join has other join conjuncts Such as mv def is select l_orderkey, o_orderdate from lineitem inner join orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; The query can be rewtritten by mv sucessfully when has not equal conjuncts in join l_shipdate <= o_orderdate` and `ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; select l_orderkey, o_orderdate from lineitem inner join orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty;
…s other join conjuncts (apache#41674) Support rewrite by materialized view when join has other join conjuncts Such as mv def is select l_orderkey, o_orderdate from lineitem inner join orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; The query can be rewtritten by mv sucessfully when has not equal conjuncts in join l_shipdate <= o_orderdate` and `ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty; select l_orderkey, o_orderdate from lineitem inner join orders on l_orderkey = o_orderkey and l_shipdate <= o_orderdate inner join partsupp on ps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty;
Proposed changes
Support rewrite by materialized view when join has other join conjuncts
Such as mv def is
The query can be rewtritten by mv sucessfully when has not equal conjuncts in join
l_shipdate <= o_orderdateandps_partkey = l_partkey and l_orderkey + o_orderkey != ps_availqty;