rubenada commented on a change in pull request #2550:
URL: https://github.com/apache/calcite/pull/2550#discussion_r719178760



##########
File path: 
linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java
##########
@@ -4275,13 +4275,22 @@ private boolean advance() {
           // mergeJoin assumes inputs sorted in ascending order with nulls 
last,
           // if we reach a null key, we are done.
           if (leftKey == null || rightKey == null) {
-            if (joinType == JoinType.LEFT || (joinType == JoinType.ANTI && 
leftKey != null)) {
-              // all remaining items in left are results for left/anti join
-              remainingLeft = true;
-              return true;
+            if (rightKey == null || !(getLeftEnumerator() instanceof 
MergeJoinEnumerator

Review comment:
       Indeed, that looks like a problem.
   We should try to find out the root cause of how / by which rule(s) that 
final plan was obtained. 
   Perhaps there is an issue with the collations of EnumerableMergeJoin (or its 
inputs) ?




-- 
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]


Reply via email to