Package org.apache.calcite.sql.type
Class ComparableOperandTypeChecker
java.lang.Object
org.apache.calcite.sql.type.SameOperandTypeChecker
org.apache.calcite.sql.type.ComparableOperandTypeChecker
- All Implemented Interfaces:
SqlOperandTypeChecker
,SqlSingleOperandTypeChecker
Type checking strategy which verifies that types have the required attributes
to be used as arguments to comparison operators.
-
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
ConstructorDescriptionComparableOperandTypeChecker
(int nOperands, RelDataTypeComparability requiredComparability) Deprecated.ComparableOperandTypeChecker
(int nOperands, RelDataTypeComparability requiredComparability, SqlOperandTypeChecker.Consistency consistency) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkOperandTypes
(SqlCallBinding callBinding, boolean throwOnFailure) Checks the types of all operands to an operator call.boolean
checkOperandTypes
(SqlOperatorBinding operatorBinding, SqlCallBinding callBinding) Similar functionality tocheckOperandTypes(SqlCallBinding, boolean)
, but not part of the interface, and cannot throw an error.Returns the strategy for making the arguments have consistency types.protected String
Override to change the behavior ofSameOperandTypeChecker.getAllowedSignatures(SqlOperator, String)
.Methods inherited from class org.apache.calcite.sql.type.SameOperandTypeChecker
checkOperandTypesImpl, checkSingleOperandType, getAllowedSignatures, getOperandCountRange, getOperandList
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, isFixedParameters, isOptional, or, typeInference, withGenerator
Methods inherited from interface org.apache.calcite.sql.type.SqlSingleOperandTypeChecker
and, or
-
Constructor Details
-
ComparableOperandTypeChecker
@Deprecated public ComparableOperandTypeChecker(int nOperands, RelDataTypeComparability requiredComparability) Deprecated. -
ComparableOperandTypeChecker
public ComparableOperandTypeChecker(int nOperands, RelDataTypeComparability requiredComparability, SqlOperandTypeChecker.Consistency consistency)
-
-
Method Details
-
checkOperandTypes
Description copied from interface:SqlOperandTypeChecker
Checks the types of all operands to an operator call.- Specified by:
checkOperandTypes
in interfaceSqlOperandTypeChecker
- Specified by:
checkOperandTypes
in interfaceSqlSingleOperandTypeChecker
- Overrides:
checkOperandTypes
in classSameOperandTypeChecker
- Parameters:
callBinding
- description of the call to be checkedthrowOnFailure
- whether to throw an exception if check fails (otherwise returns false in that case)- Returns:
- whether check succeeded
-
checkOperandTypes
Similar functionality tocheckOperandTypes(SqlCallBinding, boolean)
, but not part of the interface, and cannot throw an error.- Overrides:
checkOperandTypes
in classSameOperandTypeChecker
-
getTypeName
Description copied from class:SameOperandTypeChecker
Override to change the behavior ofSameOperandTypeChecker.getAllowedSignatures(SqlOperator, String)
.- Overrides:
getTypeName
in classSameOperandTypeChecker
-
getConsistency
Description copied from interface:SqlOperandTypeChecker
Returns the strategy for making the arguments have consistency types.
-