You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/01/19 03:17:59 UTC
[GitHub] [calcite] chunweilei commented on a change in pull request #1768:
[CALCITE-3704] Implement STRCMP function
chunweilei commented on a change in pull request #1768: [CALCITE-3704] Implement STRCMP function
URL: https://github.com/apache/calcite/pull/1768#discussion_r368262446
##########
File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
##########
@@ -368,6 +368,11 @@ public static String space(int n) {
return repeat(" ", n);
}
+ /** SQL STRCMP(String,String) function. */
+ public static Integer strcmp(String s0, String s1) {
+ return (int) Math.signum(s1.compareTo(s0));
Review comment:
IMO, the return type should be `int`.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services