Package org.apache.calcite
Enum DataContext.Variable
- All Implemented Interfaces:
Serializable
,Comparable<DataContext.Variable>
,Constable
- Enclosing interface:
DataContext
Variable that may be asked for in a call to
DataContext.get(java.lang.String)
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA mutable flag that indicates whether user has requested that the current statement be canceled.The time at which the current statement started executing.The time at which the current statement started executing.Locale in which the current statement is executing.The Spark engine.Advisor that suggests completion hints for SQL statements.Writer to the standard error (stderr).Reader on the standard input (stdin).Writer to the standard output (stdout).The system user.Set of built-in and custom time frames for use in functions such asFLOOR
andEXTRACT
.Time zone in which the current statement is executing.Query timeout in milliseconds.The query user. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
get
(DataContext dataContext) Returns the value of this variable in a given data context.static DataContext.Variable
Returns the enum constant of this type with the specified name.static DataContext.Variable[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UTC_TIMESTAMP
-
CURRENT_TIMESTAMP
The time at which the current statement started executing. In milliseconds after 1970-01-01 00:00:00, UTC. Required. -
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
The Spark engine. Available if Spark is on the class path. -
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
Query timeout in milliseconds. When no timeout is set, the value is 0 or not present. -
SQL_ADVISOR
Advisor that suggests completion hints for SQL statements. -
STDERR
Writer to the standard error (stderr). -
STDIN
Reader on the standard input (stdin). -
STDOUT
Writer to the standard output (stdout). -
LOCALE
Locale in which the current statement is executing. Affects the behavior of functions such asDAYNAME
andMONTHNAME
. Required; defaults to the root locale if the connection does not specify a locale. -
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. -
TIME_FRAME_SET
Set of built-in and custom time frames for use in functions such asFLOOR
andEXTRACT
. Required; defaults toTimeFrames.CORE
. -
USER
The query user.Default value is "sa".
-
SYSTEM_USER
The system user.Default value is "user.name" from
System.getProperty(String)
.
-
-
Field Details
-
camelName
-
clazz
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
get
Returns the value of this variable in a given data context.
-