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 2019/03/11 22:03:05 UTC

[GitHub] [calcite] siddharthteotia commented on a change in pull request #1031: [CALCITE-2742] Update RexImpTable to use DataContext to retrieve USER and SYSTEM_USER

siddharthteotia commented on a change in pull request #1031: [CALCITE-2742] Update RexImpTable to use DataContext to retrieve USER and SYSTEM_USER
URL: https://github.com/apache/calcite/pull/1031#discussion_r264449448
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java
 ##########
 @@ -1966,6 +1967,20 @@ public static TimeZone timeZone(DataContext root) {
     return (TimeZone) DataContext.Variable.TIME_ZONE.get(root);
   }
 
+  /** SQL {@code USER} function. */
+  @Deterministic
+  public static String user(DataContext root) {
+    return java.util.Optional.ofNullable((String) DataContext.Variable.USER.get(root))
 
 Review comment:
   done.

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