Copilot commented on code in PR #50886:
URL: https://github.com/apache/doris/pull/50886#discussion_r2088329227


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalJoin.java:
##########
@@ -426,8 +426,9 @@ public LogicalJoin<Plan, Plan> 
withJoinConjuncts(List<Expression> hashJoinConjun
                 Optional.empty(), Optional.of(getLogicalProperties()), 
children, otherJoinReorderContext);
     }
 

Review Comment:
   The new parameter `markJoinConjuncts` is not documented. Please update or 
add Javadoc on this public method to explain its purpose and how it differs 
from the original builder.
   ```suggestion
   
       /**
        * Creates a new LogicalJoin with updated hash join conjuncts, mark join 
conjuncts, and child plans.
        *
        * @param hashJoinConjuncts the list of hash join conjuncts used for 
hash-based join conditions.
        * @param markJoinConjuncts the list of mark join conjuncts used for 
marking specific join conditions.
        *                          These are typically used in semi-join or 
anti-join scenarios to track
        *                          whether a condition is satisfied.
        * @param left the left child plan.
        * @param right the right child plan.
        * @param otherJoinReorderContext the context for join reordering.
        * @return a new LogicalJoin instance with the specified parameters.
        */
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownExpressionsInHashCondition.java:
##########
@@ -62,8 +63,19 @@ public class PushDownExpressionsInHashCondition extends 
OneRewriteRuleFactory {
     @Override
     public Rule build() {
         return logicalJoin()
-                .when(join -> 
join.getHashJoinConjuncts().stream().anyMatch(equalTo ->
-                        equalTo.children().stream().anyMatch(e -> !(e 
instanceof Slot))))
+                .when(join -> {

Review Comment:
   [nitpick] The `when` predicate is now fairly complex. Consider extracting 
the mark‐join detection logic into a helper method for clarity and easier unit 
testing.



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