DonnyZone commented on a change in pull request #1755: [CALCITE-3731] Add IF 
function for BigQuery, Hive and Spark Dialects
URL: https://github.com/apache/calcite/pull/1755#discussion_r366761205
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
 ##########
 @@ -349,6 +349,11 @@ public static String reverse(String s) {
     return buf.reverse().toString();
   }
 
+  /** SQL IF(boolean, object, object) function. */
+  public static Object ifFunction(boolean a, Object b, Object c) {
+    return a ? b : c;
 
 Review comment:
   Boolean?

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