BiteTheDDDDt opened a new pull request, #64637:
URL: https://github.com/apache/doris/pull/64637

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   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.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: Manual test
       - Ran `clang-format` v16 on changed C++ files
       - Ran `git diff --check`
       - BE build was started but interrupted per request; not used as 
validation
   - Behavior changed: Yes. Equal-cost conjuncts now preserve their original 
order when `enable_adjust_conjunct_order_by_cost` is enabled.
   - Does this need documentation: No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to