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

[Enhancement] Support partial refresh in text based mv rewrite (backport #56166) #56397

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 28, 2025

Why I'm doing:

Before text based mv rewrite can only work if MV is valid and refresh complete. But transparent mv has been supported, so we can use transparent mv to support text based mv rewrite even if mv has been partial refreshed.

What I'm doing:

  • Support partial refresh in text based mv rewrite which means if query matches the defined mv, we can rewrite it by the mv even if the mv is partial updated.
  • Remove some unused codes

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Signed-off-by: shuming.li <[email protected]>
(cherry picked from commit ec3cc1f)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/QueryOptimizer.java
#	fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/materialization/MvPartitionCompensator.java
@mergify mergify bot added the conflicts label Feb 28, 2025
Copy link
Contributor Author

mergify bot commented Feb 28, 2025

Cherry-pick of ec3cc1f has failed:

On branch mergify/bp/branch-3.4/pr-56166
Your branch is up to date with 'origin/branch-3.4'.

You are currently cherry-picking commit ec3cc1f11.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/MaterializedViewTransparentRewriteRule.java
	modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/materialization/rule/TextMatchBasedRewriteRule.java
	modified:   fe/fe-core/src/test/java/com/starrocks/sql/optimizer/rule/transformation/materialization/MvTransparentUnionRewriteOlapTest.java

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/QueryOptimizer.java
	both modified:   fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/transformation/materialization/MvPartitionCompensator.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot closed this Feb 28, 2025
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) February 28, 2025 02:25
auto-merge was automatically disabled February 28, 2025 02:25

Pull request was closed

Copy link
Contributor Author

mergify bot commented Feb 28, 2025

@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr

Signed-off-by: shuming.li <[email protected]>
@LiShuMing LiShuMing reopened this Feb 28, 2025
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) February 28, 2025 02:59
Signed-off-by: shuming.li <[email protected]>
@wanpengfei-git wanpengfei-git merged commit d5970cc into branch-3.4 Feb 28, 2025
29 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.4/pr-56166 branch February 28, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants