Skip to content

branch-4.1: [fix](be) Stabilize conjunct cost ordering #64637 - #64868

Merged
yiguolei merged 1 commit into
branch-4.1from
auto-pick-64637-branch-4.1
Jun 26, 2026
Merged

branch-4.1: [fix](be) Stabilize conjunct cost ordering #64637#64868
yiguolei merged 1 commit into
branch-4.1from
auto-pick-64637-branch-4.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #64637

Problem Summary: When `enable_adjust_conjunct_order_by_cost` is enabled,
conjuncts are sorted by `execute_cost` with `std::ranges::sort`.
Equal-cost conjuncts may have their original relative order changed,
which can introduce unnecessary evaluation-order side effects. This
patch switches the cost ordering paths to `std::ranges::stable_sort` so
lower-cost conjuncts are still prioritized while equal-cost conjuncts
keep their original order.
@github-actions
github-actionsBot requested a review from yiguolei as a code ownerJune 26, 2026 02:09
@hello-stephen

Copy link
Copy Markdown
Contributor

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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (3/3) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage73.85% (27513/37256)
Line Coverage57.44% (297996/518806)
Region Coverage54.98% (249656/454067)
Branch Coverage56.46% (108165/191594)

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jun 26, 2026
@github-actions

Copy link
Copy Markdown
ContributorAuthor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
ContributorAuthor

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit ec521fc into branch-4.1Jun 26, 2026
32 of 34 checks passed
@morningman
morningman deleted the auto-pick-64637-branch-4.1 branch July 8, 2026 14:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hello-stephen@yiguolei@BiteTheDDDDt