Package org.apache.calcite.sql
Class SqlPostfixOperator
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlPostfixOperator
- Direct Known Subclasses:
SqlJsonValueExpressionOperator
A postfix unary operator.
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
ConstructorsConstructorDescriptionSqlPostfixOperator(String name, SqlKind kind, int prec, @Nullable SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker) -
Method Summary
Modifier and TypeMethodDescriptionprotected RelDataTypeadjustType(SqlValidator validator, SqlCall call, RelDataType type) Validates and determines coercibility and resulting collation name of binary operator if needed.@Nullable StringgetSignatureTemplate(int operandsCount) Returns a template describing how the operator signature is to be built.Returns the syntactic type of this operator, never null.booleanvalidRexOperands(int count, Litmus litmus) Returns whether the given operands are valid.Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, 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, getSqlCallFactory, 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
-
Constructor Details
-
SqlPostfixOperator
public SqlPostfixOperator(String name, SqlKind kind, int prec, @Nullable SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker)
-
-
Method Details
-
getSyntax
Description copied from class:SqlOperatorReturns the syntactic type of this operator, never null.- Specified by:
getSyntaxin classSqlOperator
-
getSignatureTemplate
Description copied from class:SqlOperatorReturns a template describing how the operator signature is to be built. E.g for the binary + operator the template looks like "{1} {0} {2}" {0} is the operator, subsequent numbers are operands.- Overrides:
getSignatureTemplatein classSqlOperator- Parameters:
operandsCount- is used with functions that can take a variable number of operands- Returns:
- signature template, or null to indicate that a default template will suffice
-
adjustType
Description copied from class:SqlOperatorValidates and determines coercibility and resulting collation name of binary operator if needed.- Overrides:
adjustTypein classSqlOperator
-
validRexOperands
Description copied from class:SqlOperatorReturns whether the given operands are valid. If not valid andfail, throws an assertion error.Similar to
SqlOperator.checkOperandCount(org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.type.SqlOperandTypeChecker, org.apache.calcite.sql.SqlCall), but some operators may have different valid operands inSqlNodeandRexNodeformats (some examples are CAST and AND), and this method throws internal errors, not user errors.- Overrides:
validRexOperandsin classSqlOperator
-