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 #56166

Merged

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Feb 21, 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

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@LiShuMing LiShuMing requested a review from a team as a code owner February 21, 2025 09:59
@LiShuMing LiShuMing force-pushed the support_partital_update_in_text_rewrite branch from f63c242 to 537ecd1 Compare February 21, 2025 10:00
@github-actions github-actions bot added the 3.4 label Feb 21, 2025
@LiShuMing LiShuMing changed the title [Enhancement] Support partial refresh in text based mv rewrite [UT] [Enhancement] Support partial refresh in text based mv rewrite Feb 21, 2025
@LiShuMing LiShuMing changed the title [UT] [Enhancement] Support partial refresh in text based mv rewrite [Enhancement] Support partial refresh in text based mv rewrite Feb 24, 2025
Signed-off-by: shuming.li <[email protected]>
Signed-off-by: shuming.li <[email protected]>
@LiShuMing LiShuMing force-pushed the support_partital_update_in_text_rewrite branch from 2f2329f to 1dbff20 Compare February 27, 2025 08:59
@LiShuMing LiShuMing changed the title [Enhancement] Support partial refresh in text based mv rewrite [UT] [Enhancement] Support partial refresh in text based mv rewrite Feb 27, 2025
@LiShuMing LiShuMing changed the title [UT] [Enhancement] Support partial refresh in text based mv rewrite [Enhancement] Support partial refresh in text based mv rewrite Feb 27, 2025
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 56 / 59 (94.92%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/MvPartitionCompensator.java 11 14 78.57% [482, 488, 496]
🔵 com/starrocks/sql/optimizer/QueryOptimizer.java 2 2 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/materialization/rule/TextMatchBasedRewriteRule.java 42 42 100.00% []
🔵 com/starrocks/sql/optimizer/rule/transformation/MaterializedViewTransparentRewriteRule.java 1 1 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@LiShuMing LiShuMing enabled auto-merge (squash) February 27, 2025 11:41
@LiShuMing LiShuMing merged commit ec3cc1f into StarRocks:main Feb 28, 2025
97 checks passed
@LiShuMing LiShuMing deleted the support_partital_update_in_text_rewrite branch February 28, 2025 02:24
Copy link

@Mergifyio backport branch-3.4

@github-actions github-actions bot removed the 3.4 label Feb 28, 2025
Copy link
Contributor

mergify bot commented Feb 28, 2025

backport branch-3.4

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 28, 2025
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
wanpengfei-git pushed a commit that referenced this pull request Feb 28, 2025
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.

3 participants