public class SqlInternalOperator extends SqlSpecialOperator
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.
SqlSpecialOperator.ReduceResult, SqlSpecialOperator.TokenSequence
kind, MDX_PRECEDENCE, NL
Constructor and 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) |
Modifier and Type | Method and 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.
|
reduceExpr
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
public SqlInternalOperator(java.lang.String name, SqlKind kind)
public SqlInternalOperator(java.lang.String name, SqlKind kind, int prec)
public SqlInternalOperator(java.lang.String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
public SqlSyntax getSyntax()
SqlOperator
getSyntax
in class SqlSpecialOperator
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
SqlOperator
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.
deriveType
in class SqlOperator
validator
- Validatorscope
- Scope of validationcall
- Call to this operatorCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.