diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java index 205cfbd25309d8..3ef703fc03b490 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java @@ -1387,7 +1387,6 @@ public PlanFragment visitPhysicalHashJoin( hashJoin.getOtherJoinConjuncts() .stream() - .filter(e -> !(e.equals(BooleanLiteral.TRUE))) .flatMap(e -> e.getInputSlots().stream()) .map(SlotReference.class::cast) .forEach(s -> hashOutputSlotReferenceMap.put(s.getExprId(), s)); @@ -1529,11 +1528,10 @@ public PlanFragment visitPhysicalHashJoin( leftIntermediateSlotDescriptor.forEach(sd -> sd.setIsNullable(true)); } + // Constant expr will cause be crash. + // But EliminateJoinCondition and Expression Rewrite already eliminate true literal. List otherJoinConjuncts = hashJoin.getOtherJoinConjuncts() .stream() - // TODO add constant expr will cause be crash, currently we only handle true literal. - // remove it after Nereids could ensure no constant expr in other join condition - .filter(e -> !(e.equals(BooleanLiteral.TRUE))) .map(e -> ExpressionTranslator.translate(e, context)) .collect(Collectors.toList());