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
,SqlDefaultOperator
,SqlDotOperator
,SqlFunctionalOperator
,SqlInfixOperator
,SqlInternalOperator
,SqlItemOperator
,SqlJsonApiCommonSyntaxOperator
,SqlJsonValueExpressionOperator
,SqlLateralOperator
,SqlLikeOperator
,SqlLiteralChainOperator
,SqlMultisetQueryConstructor
,SqlMultisetValueConstructor
,SqlOrderBy.Operator
,SqlRowOperator
,SqlSequenceValueOperator
,SqlThrowOperator
,SqlValuesOperator
,SqlWith.SqlWithOperator
,SqlWithItem.SqlWithItemOperator
public class SqlSpecialOperator extends SqlOperator
Generic operator for nodes with special syntax.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SqlSpecialOperator.ReduceResult
static interface
SqlSpecialOperator.TokenSequence
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
Constructors Constructor Description SqlSpecialOperator(java.lang.String name, SqlKind kind)
SqlSpecialOperator(java.lang.String name, SqlKind kind, int prec)
SqlSpecialOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlSyntax
getSyntax()
Returns the syntactic type of this operator, never null.SqlSpecialOperator.ReduceResult
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, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, needsSpace, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
-
-
-
-
Constructor Detail
-
SqlSpecialOperator
public SqlSpecialOperator(java.lang.String name, SqlKind kind)
-
SqlSpecialOperator
public SqlSpecialOperator(java.lang.String name, SqlKind kind, int prec)
-
SqlSpecialOperator
public SqlSpecialOperator(java.lang.String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
-
-
Method Detail
-
getSyntax
public SqlSyntax 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
-
-