vldpyatkov commented on code in PR #13742:
URL: https://github.com/apache/ignite/pull/13742#discussion_r4376702273


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -257,9 +258,22 @@ else if (c2 != HIGHEST_VALUE)
     /** */
     @SuppressWarnings("rawtypes")
     private static int compare(Object o1, Object o2, int nullComparison) {
+        if (o1 == o2)
+            return 0;
+        else if (o1 == null)
+            return nullComparison;
+        else if (o2 == null)
+            return -nullComparison;
+
         if (BinaryUtils.isBinaryObjectImpl(o1))
             return compareBinary(o1, o2, nullComparison);
 
+        if (o1 instanceof List && o2 instanceof List)
+            return Functions.compareLists((List<?>)o1, (List<?>)o2);

Review Comment:
   This is an ordering comparison, not an equality check. We need to determine 
which array is greater: for example, [2] > [1, 100], despite being shorter. 
Size should only break the tie when the common prefix is equal.



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