danny0405 commented on a change in pull request #1299: [CALCITE-3100] cast(? as 
DATE) won't work with PreparedStatement
URL: https://github.com/apache/calcite/pull/1299#discussion_r300829513
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
 ##########
 @@ -2523,6 +2523,16 @@ public static int subtractMonths(long t0, long t1) {
     return x;
   }
 
+
+  public static Integer dateStringToUnixDate(String s) {
+    return s == null ? null : DateTimeUtils.dateStringToUnixDate(s);
 
 Review comment:
   Accept null args is another topic, i think use the 
`DateTimeUtils.dateStringToUnixDate` directly is ok for this patch.

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