Skip to content

Commit

Permalink
[minor](Nereids): remove useless stream filter() in Translator (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener authored Apr 17, 2024
1 parent de6334e commit 5cd4901
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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<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());

Expand Down

0 comments on commit 5cd4901

Please sign in to comment.