[Enhancement] Optimize correlated join row count estimation to avoid repeated Statistics.buildFrom#67773
Merged
Merged
Conversation
…repeated Statistics.buildFrom Signed-off-by: stephen <stephen5217@163.com>
|
Contributor
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
[FE Incremental Coverage Report]✅ pass : 15 / 16 (93.75%) file detail
|
Contributor
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
Contributor
|
@cursor review |
Seaven
approved these changes
Jan 13, 2026
kangkaisen
approved these changes
Jan 13, 2026
Contributor
|
@Mergifyio backport branch-4.0 |
Contributor
|
@Mergifyio backport branch-3.5 |
Contributor
|
@Mergifyio backport branch-4.1 |
Contributor
✅ Backports have been createdDetails
|
Contributor
✅ Backports have been createdDetails
|
Contributor
❌ No backport have been createdDetails
GitHub error: |
24 tasks
24 tasks
farhad-celo
pushed a commit
to farhad-celo/starrocks
that referenced
this pull request
Jan 20, 2026
…repeated Statistics.buildFrom (StarRocks#67773) Signed-off-by: stephen <stephen5217@163.com> Signed-off-by: Farhad Shahmohammadi <f.shahmohammadi@celonis.com>
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.




Why I'm doing:
Correlated join equality predicates are common in multi-join queries, and the current statistics estimation path applies auxiliary predicates by repeatedly rebuilding
Statisticsobjects (multipleStatistics.buildFrom(...).build()per join). This adds unnecessary CPU overhead and object allocations in a hot optimizer path.What I'm doing:
Statistics.buildFrom(...)calls.Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Speeds up correlated inner-join cardinality estimation without changing semantics.
UNKNOWN_AUXILIARY_FILTER_COEFFICIENT^(k-1)to scale auxiliary predicatesestimateByEqOnPredicates/estimateByAuxiliaryPredicatesand unused importsWritten by Cursor Bugbot for commit 34e8eda. This will update automatically on new commits. Configure here.