[minor](Nereids): remove useless stream filter() in Translator (#33758)

This commit is contained in:
jakevin
2024-04-17 18:35:48 +08:00
committed by yiguolei
parent ee3b6fdf58
commit 461561fed0

View File

@ -1383,7 +1383,6 @@ public class PhysicalPlanTranslator extends DefaultPlanVisitor<PlanFragment, Pla
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));
@ -1525,11 +1524,10 @@ public class PhysicalPlanTranslator extends DefaultPlanVisitor<PlanFragment, Pla
leftIntermediateSlotDescriptor.forEach(sd -> sd.setIsNullable(true));
}
// Constant expr will cause be crash.
// But EliminateJoinCondition and Expression Rewrite already eliminate true literal.
List<Expr> 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());