rubenada commented on a change in pull request #1833: [CALCITE-3828] MergeJoin 
throws NPE in case of null keys
URL: https://github.com/apache/calcite/pull/1833#discussion_r384459011
 
 

 ##########
 File path: 
linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java
 ##########
 @@ -3829,6 +3829,12 @@ private boolean advance() {
       TInner right = rightEnumerator.current();
       TKey rightKey = innerKeySelector.apply(right);
       for (;;) {
+        // mergeJoin assumes inputs sorted in ascending order with nulls last,
 
 Review comment:
   It's set by EnumerableMergeJoinRule:
   
https://github.com/apache/calcite/blob/e427180b6a55445fe246b00c60259a95f96bdbf2/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableMergeJoinRule.java#L72
   which forces EnumerableMergeJoin's inputs to be sorted by key ascending, 
nulls last.
   So, this sort collation is assumed when we arrive to 
EnumerableDefaults#MergeJoinEnumerator (note that there is already some 
IllegalStateException in there if inputs are not in ascending order)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to