Package org.apache.calcite.sql.type
Class SameOperandTypeExceptLastOperandChecker
java.lang.Object
org.apache.calcite.sql.type.SameOperandTypeChecker
org.apache.calcite.sql.type.SameOperandTypeExceptLastOperandChecker
- All Implemented Interfaces:
SqlOperandTypeChecker
,SqlSingleOperandTypeChecker
Parameter type-checking strategy where all operand types except last one must be the same.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.sql.type.SqlOperandTypeChecker
SqlOperandTypeChecker.Consistency
-
Field Summary
Fields inherited from class org.apache.calcite.sql.type.SameOperandTypeChecker
nOperands
-
Constructor Summary
ConstructorDescriptionSameOperandTypeExceptLastOperandChecker
(int nOperands, String lastOperandTypeName) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkOperandTypesImpl
(SqlOperatorBinding operatorBinding, boolean throwOnFailure, @Nullable SqlCallBinding callBinding) getAllowedSignatures
(SqlOperator op, String opName) Returns a string describing the allowed formal signatures of a call, e.g.Methods inherited from class org.apache.calcite.sql.type.SameOperandTypeChecker
checkOperandTypes, checkOperandTypes, checkSingleOperandType, getOperandCountRange, getOperandList, getTypeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.sql.type.SqlOperandTypeChecker
and, getConsistency, isFixedParameters, isOptional, or, typeInference, withGenerator
Methods inherited from interface org.apache.calcite.sql.type.SqlSingleOperandTypeChecker
and, or
-
Field Details
-
lastOperandTypeName
-
-
Constructor Details
-
SameOperandTypeExceptLastOperandChecker
-
-
Method Details
-
checkOperandTypesImpl
protected boolean checkOperandTypesImpl(SqlOperatorBinding operatorBinding, boolean throwOnFailure, @Nullable SqlCallBinding callBinding) - Overrides:
checkOperandTypesImpl
in classSameOperandTypeChecker
-
getAllowedSignatures
Description copied from interface:SqlOperandTypeChecker
Returns a string describing the allowed formal signatures of a call, e.g. "SUBSTR(VARCHAR, INTEGER, INTEGER)".- Specified by:
getAllowedSignatures
in interfaceSqlOperandTypeChecker
- Overrides:
getAllowedSignatures
in classSameOperandTypeChecker
- Parameters:
op
- the operator being checkedopName
- name to use for the operator in case of aliasing- Returns:
- generated string
-