public class SqlCastFunction extends SqlFunction
| Modifier and Type | Field and Description |
|---|---|
private com.google.common.collect.SetMultimap<SqlTypeFamily,SqlTypeFamily> |
nonMonotonicCasts
Map of all casts that do not preserve monotonicity.
|
kind, MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlCastFunction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
Makes sure that the number and types of arguments are allowable.
|
SqlMonotonicity |
getMonotonicity(SqlOperatorBinding call)
Returns whether a call to this operator is monotonic.
|
SqlOperandCountRange |
getOperandCountRange()
Returns a constraint on the number of operands expected by this operator.
|
String |
getSignatureTemplate(int operandsCount)
Returns a template describing how the operator signature is to be built.
|
SqlSyntax |
getSyntax()
Returns the syntactic type of this operator, never null.
|
RelDataType |
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called
after the number and types of operands have already been validated.
|
void |
unparse(SqlWriter writer,
SqlCall call,
int leftPrec,
int rightPrec)
Writes a SQL representation of a call to this operator to a writer,
including parentheses if the operators on either side are of greater
precedence.
|
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, isQuantifierAllowed, validateCall, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, hashCode, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandsprivate final com.google.common.collect.SetMultimap<SqlTypeFamily,SqlTypeFamily> nonMonotonicCasts
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlOperatorSqlReturnTypeInference to the constructor.inferReturnType in class SqlOperatoropBinding - description of invocation (not necessarily a
SqlCall)public String getSignatureTemplate(int operandsCount)
SqlOperatorgetSignatureTemplate in class SqlOperatoroperandsCount - is used with functions that can take a variable
number of operandspublic SqlOperandCountRange getOperandCountRange()
SqlOperatorSqlOperandTypeChecker associated with this
operator.getOperandCountRange in class SqlOperatorpublic boolean checkOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure)
checkOperandTypes in class SqlOperatorcallBinding - description of callthrowOnFailure - whether to throw an exception if check fails
(otherwise returns false in that case)public SqlSyntax getSyntax()
SqlOperatorgetSyntax in class SqlFunctionpublic void unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
SqlOperatorThe default implementation of this method delegates to
SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int).
unparse in class SqlFunctionpublic SqlMonotonicity getMonotonicity(SqlOperatorBinding call)
SqlOperatorDefault implementation returns SqlMonotonicity.NOT_MONOTONIC.
getMonotonicity in class SqlOperatorcall - Call to this operator with particular arguments and information
about the monotonicity of the argumentsCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.