Skip to content
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

branch-2.1: [test](mtmv)Check whether the constants in SQL will hit mtmv #40442 #46671

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 9, 2025

Cherry-picked from #40442

## 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
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring closed this Jan 9, 2025
@dataroaring dataroaring reopened this Jan 9, 2025
@hello-stephen
Copy link
Contributor

run buildall

@yiguolei yiguolei merged commit e3c740d into branch-2.1 Jan 9, 2025
19 checks passed
@github-actions github-actions bot deleted the auto-pick-40442-branch-2.1 branch January 9, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants