Package org.apache.calcite.sql
Class SqlInternalOperator
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlSpecialOperator
org.apache.calcite.sql.SqlInternalOperator
- Direct Known Subclasses:
SqlIntervalOperator
,SqlMeasureOperator
,SqlSetSemanticsTableOperator
Generic operator for nodes with internal syntax.
If you do not override getSyntax()
or
SqlOperator.unparse(SqlWriter, SqlCall, int, int)
, they will be unparsed using
function syntax, F(arg1, arg2, ...)
. This may be OK for operators
that never appear in SQL, only as structural elements in an abstract syntax
tree.
You can use this operator, without creating a sub-class, for non-expression nodes. Validate will validate the arguments, but will not attempt to deduce a type.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.SqlSpecialOperator
SqlSpecialOperator.ReduceResult, SqlSpecialOperator.TokenSequence
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Constructor Summary
ConstructorDescriptionSqlInternalOperator
(String name, SqlKind kind) SqlInternalOperator
(String name, SqlKind kind, int prec) SqlInternalOperator
(String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker) -
Method Summary
Modifier and TypeMethodDescriptionderiveType
(SqlValidator validator, SqlValidatorScope scope, SqlCall call) Derives the type of a call to this operator.Returns the syntactic type of this operator, never null.Methods inherited from class org.apache.calcite.sql.SqlSpecialOperator
reduceExpr
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
-
Constructor Details
-
SqlInternalOperator
-
SqlInternalOperator
-
SqlInternalOperator
public SqlInternalOperator(String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
-
-
Method Details
-
getSyntax
Description copied from class:SqlOperator
Returns the syntactic type of this operator, never null.- Overrides:
getSyntax
in classSqlSpecialOperator
-
deriveType
Description copied from class:SqlOperator
Derives the type of a call to this operator.This method is an intrinsic part of the validation process so, unlike
SqlOperator.inferReturnType(org.apache.calcite.sql.SqlOperatorBinding)
, specific operators would not typically override this method.- Overrides:
deriveType
in classSqlOperator
- Parameters:
validator
- Validatorscope
- Scope of validationcall
- Call to this operator- Returns:
- Type of call
-