Package org.apache.calcite.sql
Class SqlSpecialOperator
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlSpecialOperator
- Direct Known Subclasses:
SqlAsOperator
,SqlColumnListConstructor
,SqlCursorConstructor
,SqlDatetimePlusOperator
,SqlDatetimeSubtractionOperator
,SqlDotOperator
,SqlFunctionalOperator
,SqlInfixOperator
,SqlInternalOperator
,SqlItemOperator
,SqlLateralOperator
,SqlLikeOperator
,SqlLiteralChainOperator
,SqlMultisetQueryConstructor
,SqlMultisetValueConstructor
,SqlNullTreatmentOperator
,SqlRowOperator
,SqlSequenceValueOperator
,SqlThrowOperator
,SqlValuesOperator
Generic operator for nodes with special syntax.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
List of tokens: the input to a parser. -
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Constructor Summary
ConstructorDescriptionSqlSpecialOperator
(String name, SqlKind kind) SqlSpecialOperator
(String name, SqlKind kind, int prec) SqlSpecialOperator
(String name, SqlKind kind, int prec, boolean leftAssoc, @Nullable SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker) -
Method Summary
Modifier and TypeMethodDescriptionReturns the syntactic type of this operator, never null.reduceExpr
(int ordinal, SqlSpecialOperator.TokenSequence list) Reduces a list of operators and arguments according to the rules of precedence and associativity.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, deriveType, 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
-
SqlSpecialOperator
-
SqlSpecialOperator
-
SqlSpecialOperator
public SqlSpecialOperator(String name, SqlKind kind, int prec, boolean leftAssoc, @Nullable SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker)
-
-
Method Details
-
getSyntax
Description copied from class:SqlOperator
Returns the syntactic type of this operator, never null.- Specified by:
getSyntax
in classSqlOperator
-
reduceExpr
public SqlSpecialOperator.ReduceResult reduceExpr(int ordinal, SqlSpecialOperator.TokenSequence list) Reduces a list of operators and arguments according to the rules of precedence and associativity. Returns the ordinal of the node which replaced the expression.The default implementation throws
UnsupportedOperationException
.- Parameters:
ordinal
- indicating the ordinal of the current operator in the list on which a possible reduction can be madelist
- List of alternatingSqlParserUtil.ToTreeListItem
andSqlNode
- Returns:
- ordinal of the node which replaced the expression
-