alex-plekhanov commented on code in PR #10338:
URL: https://github.com/apache/ignite/pull/10338#discussion_r1001654191
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/exp/IgniteSqlFunctions.java:
##########
@@ -154,6 +154,27 @@ public static String toString(ByteString b) {
return b == null ? null : new String(b.getBytes(),
Commons.typeFactory().getDefaultCharset());
}
+ /** LEAST2. */
+ public static Object least2(Object arg0, Object arg1) {
+ return leastOrGreatest(true, arg0, arg1);
+ }
+
+ /** GREATEST2. */
+ public static Object greatest2(Object arg0, Object arg1) {
+ return leastOrGreatest(false, arg0, arg1);
+ }
+
+ /** */
+ private static Object leastOrGreatest(boolean least, Object arg0, Object
arg1) {
+ if (arg0 == null || arg1 == null)
+ return null;
+
+ if (((Comparable<Object>)arg0).compareTo(arg1) < 0)
Review Comment:
These methods only used to build index search bounds. All indexed values
should be comparable.
--
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]