[fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time#58720
Merged
morrySnow merged 1 commit intoapache:masterfrom Dec 5, 2025
Conversation
… upload from be not in time
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 34417 ms |
TPC-DS: Total hot run time: 180096 ms |
ClickBench: Total hot run time: 27.45 s |
Contributor
FE UT Coverage ReportIncrement line coverage |
Contributor
FE Regression Coverage ReportIncrement line coverage |
englefly
approved these changes
Dec 5, 2025
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
morrySnow
approved these changes
Dec 5, 2025
Contributor
FE Regression Coverage ReportIncrement line coverage |
github-actions bot
pushed a commit
that referenced
this pull request
Dec 5, 2025
… upload from be not in time (#58720) This PR introduces two key modifications to improve the reliability of the optimizer (CBO) and the testing pipeline concerning materialized views: 1. Fixes unstable selection of synchronous materialized views in the pipeline: The root cause was that the statistical information of the base table was not reported promptly. This delay could lead the CBO to estimate selectedPartitionsRowCountas zero for the materialized view, causing it to be incorrectly bypassed during query planning. The fix involves manually injecting the statistical information for the synchronous materialized view when available, ensuring the CBO can make a stable and accurate assessment of its cost . 2. Removes the fuzzy value setting for preMaterializedViewRewriteStrategyin SessionVariable: The test cases for the TRY_IN_RBO strategy have already been extended to cover scenarios equivalent to both NOT_IN_RBO and FORCE_IN_RBO. Retaining the fuzzy option can introduce unnecessary instability into the pipeline. For instance, a PR might pass tests when the strategy is TRY_IN_RBO but fail if the pipeline randomly selects NOT_IN_RBO, leading to inconsistent results. Removing this fuzzy setting helps eliminate such non-deterministic failures and enhances pipeline stability
seawinde
added a commit
to seawinde/doris
that referenced
this pull request
Dec 10, 2025
… upload from be not in time (apache#58720) This PR introduces two key modifications to improve the reliability of the optimizer (CBO) and the testing pipeline concerning materialized views: 1. Fixes unstable selection of synchronous materialized views in the pipeline: The root cause was that the statistical information of the base table was not reported promptly. This delay could lead the CBO to estimate selectedPartitionsRowCountas zero for the materialized view, causing it to be incorrectly bypassed during query planning. The fix involves manually injecting the statistical information for the synchronous materialized view when available, ensuring the CBO can make a stable and accurate assessment of its cost . 2. Removes the fuzzy value setting for preMaterializedViewRewriteStrategyin SessionVariable: The test cases for the TRY_IN_RBO strategy have already been extended to cover scenarios equivalent to both NOT_IN_RBO and FORCE_IN_RBO. Retaining the fuzzy option can introduce unnecessary instability into the pipeline. For instance, a PR might pass tests when the strategy is TRY_IN_RBO but fail if the pipeline randomly selects NOT_IN_RBO, leading to inconsistent results. Removing this fuzzy setting helps eliminate such non-deterministic failures and enhances pipeline stability
nagisa-kunhah
pushed a commit
to nagisa-kunhah/doris
that referenced
this pull request
Dec 14, 2025
… upload from be not in time (apache#58720) This PR introduces two key modifications to improve the reliability of the optimizer (CBO) and the testing pipeline concerning materialized views: 1. Fixes unstable selection of synchronous materialized views in the pipeline: The root cause was that the statistical information of the base table was not reported promptly. This delay could lead the CBO to estimate selectedPartitionsRowCountas zero for the materialized view, causing it to be incorrectly bypassed during query planning. The fix involves manually injecting the statistical information for the synchronous materialized view when available, ensuring the CBO can make a stable and accurate assessment of its cost . 2. Removes the fuzzy value setting for preMaterializedViewRewriteStrategyin SessionVariable: The test cases for the TRY_IN_RBO strategy have already been extended to cover scenarios equivalent to both NOT_IN_RBO and FORCE_IN_RBO. Retaining the fuzzy option can introduce unnecessary instability into the pipeline. For instance, a PR might pass tests when the strategy is TRY_IN_RBO but fail if the pipeline randomly selects NOT_IN_RBO, leading to inconsistent results. Removing this fuzzy setting helps eliminate such non-deterministic failures and enhances pipeline stability
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.
What problem does this PR solve?
This PR introduces two key modifications to improve the reliability of the optimizer (CBO) and the testing pipeline concerning materialized views:
Fixes unstable selection of synchronous materialized views in the pipeline: The root cause was that the statistical information of the base table was not reported promptly. This delay could lead the CBO to estimate selectedPartitionsRowCountas zero for the materialized view, causing it to be incorrectly bypassed during query planning. The fix involves manually injecting the statistical information for the synchronous materialized view when available, ensuring the CBO can make a stable and accurate assessment of its cost .
Removes the fuzzy value setting for preMaterializedViewRewriteStrategyin SessionVariable: The test cases for the TRY_IN_RBO strategy have already been extended to cover scenarios equivalent to both NOT_IN_RBO and FORCE_IN_RBO. Retaining the fuzzy option can introduce unnecessary instability into the pipeline. For instance, a PR might pass tests when the strategy is TRY_IN_RBO but fail if the pipeline randomly selects NOT_IN_RBO, leading to inconsistent results. Removing this fuzzy setting helps eliminate such non-deterministic failures and enhances pipeline stability
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)