Skip to content

fix: revert getJoinSide JoinSideBoth change and fix uniform estimation#23745

Merged
mergify[bot] merged 2 commits intomatrixorigin:mainfrom
aptend:improve-samp-ratio
Feb 13, 2026
Merged

fix: revert getJoinSide JoinSideBoth change and fix uniform estimation#23745
mergify[bot] merged 2 commits intomatrixorigin:mainfrom
aptend:improve-samp-ratio

Conversation

@aptend
Copy link
Contributor

@aptend aptend commented Feb 12, 2026

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #23724

What this PR does / why we need it:

Problem: The main branch TPCH 1t test hit OOM (commit f864d27). The change "fix: getJoinSide return JoinSideBoth when column not in either join subtree" (#23719) introduced incorrect behavior that led to this regression.

Solution:

  1. Revert the problematic getJoinSide change: Remove the logic that returns JoinSideBoth when a column's RelPos is not in leftTags or rightTags. This reverts the behavior that caused the OOM.

  2. Fix uniform estimation in ShuffleRange.Eval(): Correct the uniform density calculation:

    • Use globalDensity := float64(s.Sz) / s.SampleRatio / (s.Max - s.Min) to account for sampling ratio when computing density
    • Set s.Uniform = min(0.999, globalDensity/s.Uniform) where s.Uniform holds max local density during iteration
    • Properly propagate actualSamplingRatio to ShuffleRanges after stats collection
  3. Sampling adjustments: Increase MaxSampleObjects (2000→5000) and target sampling ratio (2%→10%) for better stats accuracy on large tables.

@mergify mergify bot added the queued label Feb 13, 2026
@mergify mergify bot merged commit 0551854 into matrixorigin:main Feb 13, 2026
51 of 64 checks passed
@mergify
Copy link
Contributor

mergify bot commented Feb 13, 2026

Merge Queue Status

Rule: main


  • Entered queue2026-02-13 07:51 UTC
  • Checks passed · in-place
  • Merged2026-02-13 07:51 UTC · at 182e51c07b603dd6fe12dd6ca2dd6db2cbf0862f

This pull request spent 5 seconds in the queue, with no time running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-neutral = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
    • check-skipped = Matrixone Standlone CI / Multi-CN e2e BVT Test on Linux/x64(LAUNCH, PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH, PESSIMISTIC)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Ubuntu/x86
    • check-neutral = Matrixone CI / SCA Test on Ubuntu/x86
    • check-skipped = Matrixone CI / SCA Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(Optimistic/PUSH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-neutral = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
    • check-skipped = Matrixone Standlone CI / e2e BVT Test on Linux/x64(LAUNCH,Optimistic)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-neutral = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
    • check-skipped = Matrixone Upgrade CI / Compatibility Test With Target on Linux/x64(LAUNCH)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants