Skip to content

Commit

Permalink
[EXPB-2582](https://jira.tools.sap/browse/EXPB-2582). Merge join does…
Browse files Browse the repository at this point in the history
… not filter out null values on left side

Signed-off-by: Corvin Kuebler <[email protected]>
  • Loading branch information
CoKueb committed Jul 26, 2024
1 parent 9321bbc commit 6f3551d
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public static EnumerableMergeJoin create(RelNode left, RelNode right,
BlockBuilder builder = new BlockBuilder();
final Result leftResult =
implementor.visitChild(this, 0, (EnumerableRel) left, pref);
final Expression leftExpression =
Expression leftExpression =
builder.append("left", leftResult.block);
final ParameterExpression left_ =
Expressions.parameter(leftResult.physType.getJavaRowType(), "left");
Expand Down Expand Up @@ -493,19 +493,16 @@ public static EnumerableMergeJoin create(RelNode left, RelNode right,
}
final RelCollation collation = RelCollations.of(fieldCollations);
final Expression comparator = leftKeyPhysType.generateMergeJoinComparator(collation);

return implementor.result(
physType,
builder.append(
Expressions.call(
BuiltInMethod.MERGE_JOIN.method,
Expressions.list(
Expressions.call(BuiltInMethod.MERGE_JOIN_NOT_NULL_ENUMERABLE.method, leftExpression,
Expressions.lambda(
leftKeyPhysType.record(leftExpressions), left_)),
leftExpression,
Expressions.call(BuiltInMethod.MERGE_JOIN_NOT_NULL_ENUMERABLE.method, rightExpression,
Expressions.lambda(
rightKeyPhysType.record(rightExpressions), right_)),
rightKeyPhysType.record(rightExpressions), right_)),
Expressions.lambda(
leftKeyPhysType.record(leftExpressions), left_),
Expressions.lambda(
Expand Down

0 comments on commit 6f3551d

Please sign in to comment.