Package org.apache.calcite.sql.fun
Class SqlBaseContextVariable
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlFunction
-
- org.apache.calcite.sql.fun.SqlBaseContextVariable
-
- Direct Known Subclasses:
SqlStringContextVariable
public class SqlBaseContextVariable extends SqlFunction
Base class for functions such as "PI", "USER", "CURRENT_ROLE", and "CURRENT_PATH".
-
-
Field Summary
-
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SqlBaseContextVariable(java.lang.String name, SqlReturnTypeInference returnType, SqlFunctionCategory category)
Creates a SqlBaseContextVariable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlMonotonicity
getMonotonicity(SqlOperatorBinding call)
Returns whether a call to this operator is monotonic.SqlSyntax
getSyntax()
Returns the syntactic type of this operator, never null.boolean
isDynamicFunction()
-
Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, isQuantifierAllowed, unparse, validateCall, validateQuantifier
-
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
-
-
-
Constructor Detail
-
SqlBaseContextVariable
protected SqlBaseContextVariable(java.lang.String name, SqlReturnTypeInference returnType, SqlFunctionCategory category)
Creates a SqlBaseContextVariable.
-
-
Method Detail
-
getSyntax
public SqlSyntax getSyntax()
Description copied from class:SqlOperator
Returns the syntactic type of this operator, never null.- Overrides:
getSyntax
in classSqlFunction
-
getMonotonicity
public SqlMonotonicity getMonotonicity(SqlOperatorBinding call)
Description copied from class:SqlOperator
Returns whether a call to this operator is monotonic.Default implementation returns
SqlMonotonicity.NOT_MONOTONIC
.- Overrides:
getMonotonicity
in classSqlOperator
- Parameters:
call
- Call to this operator with particular arguments and information about the monotonicity of the arguments
-
isDynamicFunction
public boolean isDynamicFunction()
- Overrides:
isDynamicFunction
in classSqlOperator
- Returns:
- true iff it is unsafe to cache query plans referencing this operator; false is assumed by default
-
-