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:
thanks. I realized that we do not need to check
`hashJoin.getOnClauseCondition().isPresent()`.
--
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]