zoudan commented on code in PR #2981:
URL: https://github.com/apache/calcite/pull/2981#discussion_r1070765927


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -1849,6 +1849,17 @@ public static <T extends Comparable<T>> T greatest(T b0, 
T b1) {
     return b0 == null || b1 != null && b0.compareTo(b1) < 0 ? b1 : b0;
   }
 
+  /** Less than. */
+  public static <T extends Comparable<T>> boolean lessThan(T b0, T b1) {
+    return b1 == null || b0 != null && b0.compareTo(b1) < 0;
+  }
+
+  /** Grater than. */
+  public static <T extends Comparable<T>> boolean greaterThan(T b0, T b1) {
+    return b1 == null || b0 != null && b0.compareTo(b1) > 0;

Review Comment:
   `greaterThan` return wether b0 is greater than b1 while `greatest` return 
the larger one between b0 and b1



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to