8000 [BugFix] Fix mv refresh bugs when contains null partition values (backport #59939) by mergify[bot] · Pull Request #60033 · StarRocks/starrocks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BugFix] Fix mv refresh bugs when contains null partition values (backport #59939) #60033

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

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented Jun 18, 2025

Why I'm doing:

SyncPartitionUtils.transferRange cannot handle with some corner values(min/max values):

 2025-06-16 10:53:24.328+08:00 WARN (starrocks-taskrun-pool-1|1049) [PartitionBasedMvRefreshProcessor.doRefreshMaterializedViewWithRetry():402]  [test_mv_case] refresh mv failed at 1th time: com.starrocks.sql.analyzer.SemanticException: Getting analyzing error. Detail message: Convert partition with date_trunc expression to date failed, lower:-0001-12-2
7T00:00, upper:0000-01-09T00:00.
        at com.starrocks.sql.common.SyncPartitionUtils.transferRange(SyncPartitionUtils.java:250)
        at com.starrocks.sql.common.PRangeCellPlus.lambda$toPRangeCellPlus$2(PRangeCellPlus.java:87)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1850)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
        at com.starrocks.sql.common.PRangeCellPlus.toPRangeCellPlus(PRangeCellPlus.java:90)
        at com.starrocks.sql.common.RangePartitionDiffer.generateBaseRefMap(RangePartitionDiffer.java:451)
        at com.starrocks.scheduler.mv.MVPCTRefreshRangePartitioner.syncAddOrDropPartitions(MVPCTRefreshRangePartitioner.java:128)
        at com.starrocks.scheduler.PartitionBasedMvRefreshProcessor.syncPartitions(PartitionBasedMvRefreshProcessor.java:985)
        at com.starrocks.scheduler.PartitionBasedMvRefreshProcessor.doRefreshMaterializedView(PartitionBasedMvRefreshProcessor.java:437)
        at com.starrocks.scheduler.PartitionBasedMvRefreshProcessor.doRefreshMaterializedViewWithRetry(PartitionBasedMvRefreshProcessor.java:393)
        at com.starrocks.scheduler.PartitionBasedMvRefreshProcessor.doMvRefresh(PartitionBasedMvRefreshProcessor.java:354)
        at com.starrocks.scheduler.
8000
PartitionBasedMvRefreshProcessor.processTaskRun(PartitionBasedMvRefreshProcessor.java:203)
        at com.starrocks.scheduler.TaskRun.executeTaskRun(TaskRun.java:313)
        at com.starrocks.scheduler.TaskRunExecutor.lambda$executeTaskRun$0(TaskRunExecutor.java:60)
        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)

What I'm doing:

  • Introduced a new utility method transferDateLiteral in SyncPartitionUtils to handle date literal transformations for partition range boundaries, improving code readability and reducing redundancy.
  • Add more test cases.

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.5
    • 3.4
    • 3.3

This is an automatic backport of pull request #59939 done by [Mergify](https://mergify.com).

)

Signed-off-by: shuming.li <ming.moriarty@gmail.com>
(cherry picked from commit 29b3cd1)
Copy link

@wanpengfei-git wanpengfei-git merged commit 7bcbd10 into branch-3.5 Jun 18, 2025
38 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.5/pr-59939 branch June 18, 2025 10:25
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
0