chunweilei commented on a change in pull request #1414: [CALCITE-3293] Add 
strcmp function.
URL: https://github.com/apache/calcite/pull/1414#discussion_r317570197
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
 ##########
 @@ -396,6 +396,11 @@ public static ByteString concat(ByteString s0, ByteString 
s1) {
     return s0.concat(s1);
   }
 
+  /** SQL {@code string compare string} operator. */
+  public static Integer strcmp(String s0, String s1) {
+    return s0.compareTo(s1);
+  }
 
 Review comment:
   I thin It is better to return `int` instead of `Integer`.

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