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
public class SameOperandTypeExceptLastOperandChecker extends SameOperandTypeChecker
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 Modifier and Type Field Description protected java.lang.String
lastOperandTypeName
-
Fields inherited from class org.apache.calcite.sql.type.SameOperandTypeChecker
nOperands
-
-
Constructor Summary
Constructors Constructor Description SameOperandTypeExceptLastOperandChecker(int nOperands, java.lang.String lastOperandTypeName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkOperandTypesImpl(SqlOperatorBinding operatorBinding, boolean throwOnFailure, SqlCallBinding callBinding)
java.lang.String
getAllowedSignatures(SqlOperator op, java.lang.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, getConsistency, getOperandCountRange, getOperandList, getTypeName, isOptional
-
-
-
-
Method Detail
-
checkOperandTypesImpl
protected boolean checkOperandTypesImpl(SqlOperatorBinding operatorBinding, boolean throwOnFailure, SqlCallBinding callBinding)
- Overrides:
checkOperandTypesImpl
in classSameOperandTypeChecker
-
getAllowedSignatures
public java.lang.String getAllowedSignatures(SqlOperator op, java.lang.String opName)
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
-
-