branch-2.1: [test](mtmv)Check whether the constants in SQL will hit mtmv #40442#46671
Merged
yiguolei merged 1 commit intobranch-2.1from Jan 9, 2025
Merged
branch-2.1: [test](mtmv)Check whether the constants in SQL will hit mtmv #40442#46671yiguolei merged 1 commit intobranch-2.1from
yiguolei merged 1 commit intobranch-2.1from
Conversation
## Proposed changes
Add cases regarding whether MTMV normal rewriting is still supported
when constants exist in various query statements. There are various types of statements:
("plac_x" is a placeholder and will be replaced with various pre-prepared constants in the code.)
1. select plac_1 from tb
2. select col1 from (select plac_1 as col1 from tb) as t1
3. select plac_1 from tb group by plac_1
4. select plac_1 from tb where plac_1 >= 1 group by plac_1
5. select col1 from (select plac_1 as col1 from tb where plac_1 >= 1) as t1
6. select plac_1 from tb left join (select plac_1 as col1 from tb) as t1 on plac_1 = t1.col1
7. select plac_1 from tb1 left join (select plac_1 as col1 from tb2) as t1 on plac_1 = t1.col1 group by plac_1
8. select t1.col1 from (select plac_1 as col1 from tb1 where plac_1 = plac_1) as t1 left join (select plac_1 as col2 from tb2) as t2 on t1.col1 = t2.col2 group by t1.col1
9. select t1.col1 from (select plac_1 as col1 from tb1 where plac_1 = plac_1 group by col1) as t1 left join (select plac_1 as col2 from tb2) as t2 on t1.col1 = t2.col2 group by t1.col1
10. select plac_1 from tb1 left join (select plac_2 as col1 from tb2) as t1 on plac_1 = t1.col1
11. select plac_1 from tb1 left join (select plac_2 as col1 from tb2) as t1 on plac_1 = t1.col1 group by plac_1
12. select t1.col1 from (select plac_2 as col1 from tb1 where plac_2 = plac_2) as t1 left join (select plac_1 as col2 from tb2) as t2 on t1.col1 = t2.col2 group by t1.col1
13. select t1.col1 from (select plac_2 as col1 from tb2 where plac_2 = plac_2 group by col1) as t1 left join (select plac_1 as col2 from tb1) as t2 on t1.col1 = t2.col2 group by t1.col1
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
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.
Cherry-picked from #40442