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:
SqlExtendOperator
,SqlRollupOperator
public class SqlInternalOperator extends SqlSpecialOperator
Generic operator for nodes with internal syntax.If you do not override
getSyntax()
orSqlOperator.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
Constructors Constructor Description SqlInternalOperator(java.lang.String name, SqlKind kind)
SqlInternalOperator(java.lang.String name, SqlKind kind, int prec)
SqlInternalOperator(java.lang.String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelDataType
deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
Derives the type of a call to this operator.SqlSyntax
getSyntax()
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, 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
-
SqlInternalOperator
public SqlInternalOperator(java.lang.String name, SqlKind kind)
-
SqlInternalOperator
public SqlInternalOperator(java.lang.String name, SqlKind kind, int prec)
-
SqlInternalOperator
public SqlInternalOperator(java.lang.String name, SqlKind kind, int prec, boolean isLeftAssoc, 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.- Overrides:
getSyntax
in classSqlSpecialOperator
-
deriveType
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
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
-
-