Skip to content

Conversation

@seawinde
Copy link
Contributor

@seawinde seawinde commented Dec 10, 2025

picked from #58720

… 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
@seawinde seawinde requested a review from morrySnow as a code owner December 10, 2025 12:02
@Thearas
Copy link
Contributor

Thearas commented Dec 10, 2025

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?

@seawinde
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 40.00% (2/5) 🎉
Increment coverage report
Complete coverage report

@seawinde seawinde changed the title [fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time (#58720) branch-3.1:[fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time (#58720) Dec 11, 2025
@seawinde
Copy link
Contributor Author

run buildall

@morrySnow morrySnow changed the title branch-3.1:[fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time (#58720) branch-3.1: [fix](mv) Fix sync mv could not be chosen by cbo stable because stats upload from be not in time #58720 Dec 15, 2025
@morrySnow morrySnow merged commit abbcc52 into apache:branch-3.1 Dec 15, 2025
23 of 24 checks passed
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