morrySnow commented on code in PR #11812:
URL: https://github.com/apache/doris/pull/11812#discussion_r951670737


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/join/JoinLAsscomHelper.java:
##########
@@ -74,10 +78,20 @@ public JoinLAsscomHelper(LogicalJoin<? extends Plan, 
GroupPlan> topJoin,
         b = bottomJoin.right();
         c = topJoin.right();
 
-        Preconditions.checkArgument(topJoin.getCondition().isPresent(), 
"topJoin onClause must be present.");
-        topJoinOnClause = topJoin.getCondition().get();
-        Preconditions.checkArgument(bottomJoin.getCondition().isPresent(), 
"bottomJoin onClause must be present.");
-        bottomJoinOnClause = bottomJoin.getCondition().get();
+        Preconditions.checkArgument(!topJoin.getHashJoinConjuncts().isEmpty(),
+                "topJoin hashJoinConjuncts must exist.");
+        topHashJoinConjuncts = topJoin.getHashJoinConjuncts();
+        if (topJoin.getOtherJoinCondition().isPresent()) {
+            allNonHashJoinConjuncts.addAll(
+                    
ExpressionUtils.extractConjunction(topJoin.getOtherJoinCondition().get()));
+        }
+        
Preconditions.checkArgument(!bottomJoin.getHashJoinConjuncts().isEmpty(),
+                "bottomJoin onClause must exist.");

Review Comment:
   nit: put all check at the begin to avoid use them before check 



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