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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -370,13 +369,14 @@ public PlanFragment 
visitPhysicalHashJoin(PhysicalHashJoin<Plan, Plan> hashJoin,
         if (JoinUtils.shouldNestedLoopJoin(hashJoin)) {
             throw new RuntimeException("Physical hash join could not execute 
without equal join condition.");
         } else {
-            Expression eqJoinExpression = hashJoin.getCondition().get();
-            List<Expr> execEqConjunctList = 
ExpressionUtils.extractConjunction(eqJoinExpression).stream()
-                    .map(EqualTo.class::cast)
-                    .map(e -> swapEqualToForChildrenOrder(e, 
hashJoin.left().getOutput()))
-                    .map(e -> ExpressionTranslator.translate(e, context))
-                    .collect(Collectors.toList());
-
+            List<Expr> execEqConjunctList = new ArrayList<>();
+            if (hashJoin.getOnClauseCondition().isPresent()) {
+                execEqConjunctList = hashJoin.getHashJoinPredicates().stream()
+                        .map(EqualTo.class::cast)
+                        .map(e -> swapEqualToForChildrenOrder(e, 
hashJoin.left().getOutput()))
+                        .map(e -> ExpressionTranslator.translate(e, context))
+                        .collect(Collectors.toList());
+            }

Review Comment:
   can we save the effort of running the map and collect on an empty list?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to