[improvement](mtmv) Support rewrite by materialized view when join has other join conjuncts#41674
Merged
morrySnow merged 10 commits intoapache:masterfrom Nov 6, 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 |
3 similar comments
Member
Author
|
run buildall |
Member
Author
|
run buildall |
Member
Author
|
run buildall |
zfr9527
approved these changes
Oct 14, 2024
Contributor
zfr9527
left a comment
There was a problem hiding this comment.
- 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.
Contributor
|
PR approved by anyone and no changes requested. |
9e0b44a to
b9b70b3
Compare
Member
Author
|
run buildall |
Member
Author
|
run buildall |
morrySnow
previously approved these changes
Oct 28, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Member
Author
|
run buildall |
Member
Author
|
run buildall |
morrySnow
previously approved these changes
Oct 31, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Member
Author
|
run buildall |
morrySnow
approved these changes
Nov 6, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
github-actions bot
pushed a commit
that referenced
this pull request
Nov 6, 2024
…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;
seawinde
added a commit
to seawinde/doris
that referenced
this pull request
Nov 19, 2024
…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;
16 tasks
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
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;