AMashenkov commented on code in PR #1583:
URL: https://github.com/apache/ignite-3/pull/1583#discussion_r1091726343


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/IgniteSqlFunctions.java:
##########
@@ -165,6 +165,31 @@ public static int currentTime(DataContext ctx) {
         return (int) TypeUtils.toInternal((ExecutionContext<?>) ctx, 
LocalTime.now(), LocalTime.class);
     }
 
+    /** LEAST2. */
+    public static @Nullable Object least2(Object arg0, Object arg1) {
+        return leastOrGreatest(true, arg0, arg1);
+    }
+
+    /** GREATEST2. */
+    public static @Nullable Object greatest2(Object arg0, Object arg1) {
+        return leastOrGreatest(false, arg0, arg1);
+    }
+
+    private static @Nullable Object leastOrGreatest(boolean least, Object 
arg0, Object arg1) {
+        if (arg0 == null || arg1 == null) {
+            return null;

Review Comment:
   Why least2 and greatest2 both return 'null' if one of arg is 'null' ?
   



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