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

   ### Background
   
   RBO converts eligible RIGHT OUTER, RIGHT SEMI and RIGHT ANTI joins into 
their left equivalents before subsequent join-transposition rewrites. This 
directional normalization is separate from the JoinCommute rule used by CBO to 
explore alternative join orders.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: None
   PR Type: Refactor
   
   Problem Summary:
   
   The name SemiJoinCommute hides that the RBO rule also handles outer and anti 
joins and performs a directional right-to-left conversion. Rename its class and 
file to ConvertRightJoinToLeftJoin, update both RBO registration sites and 
align the existing test method names. Preserve the rule identifier so existing 
disable_nereids_rules configurations continue to work.
   
   ### Details
   
   - **Moves vs. logic changes:** Rename the factory class/file and update 
normal RBO and MV pre-rewrite references. Matching predicates, conversion logic 
and rule execution order are unchanged; a comment explains the retained legacy 
rule identifier.
   - **Behavior change:** None.
   - **Compatibility:** Keep RuleType.LOGICAL_SEMI_JOIN_COMMUTE and the 
existing session-variable/hint checks unchanged. No protocol or storage changes.
   - **Performance impact:** None; the same predicates and transformation 
execute at the same positions.
   - **Rollback:** Revert the rename and its references together.
   
   ### Testing
   
   - `MAVEN_ARGS='-Ddisable.obs=true' bash run-fe-ut.sh --run 
org.apache.doris.nereids.rules.rewrite.ReorderJoinTest`: 12 tests passed. 
Existing tests cover the three right-join types, disabled join reordering and 
MV pre-rewrite.
   - `cd fe && mvn -Ddisable.obs=true checkstyle:check -pl fe-core`: passed 
with 0 violations.
   - `git diff --cached --check`: passed. A source comparison confirms the rule 
implementation is identical after normalizing the class name and compatibility 
comment.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Behavior changed: No.
   - Does this need documentation: No.
   - Pre-submission status: Ready.
   
   ### AI Disclosure
   
   - Tool: Codex (GPT-6).
   - Generated: Rename, reference/test-name updates and this PR description.
   - Human review: Pending author review.
   


-- 
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