mihaibudiu commented on code in PR #4029:
URL: https://github.com/apache/calcite/pull/4029#discussion_r1828597070
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -5364,6 +5364,24 @@ public static int localTime(DataContext root) {
return timestampToTime(localTimestamp(root));
}
+ /** SQL {@code SYSTIMESTAMP} function. */
+ @NonDeterministic
+ public static long sysTimestamp(DataContext root) {
+ return DataContext.Variable.SYS_TIMESTAMP.get(root);
+ }
+
+ /** SQL {@code SYSDATE} function. */
+ @NonDeterministic
+ public static int sysDate(DataContext root) {
+ final long timestamp = sysTimestamp(root);
+ int date = timestampToDate(timestamp);
+ final int time = timestampToTime(timestamp);
Review Comment:
this would be a nice comment to add to this code
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]