Enum DataContext.Variable

java.lang.Object
java.lang.Enum<DataContext.Variable>
org.apache.calcite.DataContext.Variable
All Implemented Interfaces:
Serializable, Comparable<DataContext.Variable>, java.lang.constant.Constable
Enclosing interface:
DataContext

public static enum DataContext.Variable
extends Enum<DataContext.Variable>
Variable that may be asked for in a call to DataContext.get(java.lang.String).
  • Enum Constant Details

    • UTC_TIMESTAMP

      public static final DataContext.Variable UTC_TIMESTAMP
    • CURRENT_TIMESTAMP

      public static final DataContext.Variable CURRENT_TIMESTAMP
      The time at which the current statement started executing. In milliseconds after 1970-01-01 00:00:00, UTC. Required.
    • LOCAL_TIMESTAMP

      public static final DataContext.Variable LOCAL_TIMESTAMP
      The time at which the current statement started executing. In milliseconds after 1970-01-01 00:00:00, in the time zone of the current statement. Required.
    • SPARK_CONTEXT

      public static final DataContext.Variable SPARK_CONTEXT
      The Spark engine. Available if Spark is on the class path.
    • CANCEL_FLAG

      public static final DataContext.Variable CANCEL_FLAG
      A mutable flag that indicates whether user has requested that the current statement be canceled. Cancellation may not be immediate, but implementations of relational operators should check the flag fairly frequently and cease execution (e.g. by returning end of data).
    • TIMEOUT

      public static final DataContext.Variable TIMEOUT
      Query timeout in milliseconds. When no timeout is set, the value is 0 or not present.
    • SQL_ADVISOR

      public static final DataContext.Variable SQL_ADVISOR
      Advisor that suggests completion hints for SQL statements.
    • STDERR

      public static final DataContext.Variable STDERR
      Writer to the standard error (stderr).
    • STDIN

      public static final DataContext.Variable STDIN
      Reader on the standard input (stdin).
    • STDOUT

      public static final DataContext.Variable STDOUT
      Writer to the standard output (stdout).
    • LOCALE

      public static final DataContext.Variable LOCALE
      Locale in which the current statement is executing. Affects the behavior of functions such as DAYNAME and MONTHNAME. Required; defaults to the root locale if the connection does not specify a locale.
    • TIME_ZONE

      public static final DataContext.Variable TIME_ZONE
      Time zone in which the current statement is executing. Required; defaults to the time zone of the JVM if the connection does not specify a time zone.
    • USER

      public static final DataContext.Variable USER
      The query user.

      Default value is "sa".

    • SYSTEM_USER

      public static final DataContext.Variable SYSTEM_USER
      The system user.

      Default value is "user.name" from System.getProperty(String).

  • Field Details

  • Method Details

    • values

      public static DataContext.Variable[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DataContext.Variable valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public <T> T get​(DataContext dataContext)
      Returns the value of this variable in a given data context.