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.
kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlInternalOperator(String name,
SqlKind kind) |
SqlInternalOperator(String name,
SqlKind kind,
int prec) |
SqlInternalOperator(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.
|
reduceExpracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperandspublic SqlInternalOperator(String name, SqlKind kind, int prec, boolean isLeftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
public SqlSyntax getSyntax()
SqlOperatorgetSyntax in class SqlSpecialOperatorpublic RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
SqlOperatorThis 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 SqlOperatorvalidator - Validatorscope - Scope of validationcall - Call to this operatorCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.