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
ConstructorsConstructorDescriptionComparableOperandTypeChecker(int nOperands, RelDataTypeComparability requiredComparability) Deprecated.ComparableOperandTypeChecker(int nOperands, RelDataTypeComparability requiredComparability, SqlOperandTypeChecker.Consistency consistency) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckOperandTypes(SqlCallBinding callBinding, boolean throwOnFailure) Checks the types of all operands to an operator call.booleancheckOperandTypes(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 StringOverride to change the behavior ofSameOperandTypeChecker.getAllowedSignatures(SqlOperator, String).Methods inherited from class org.apache.calcite.sql.type.SameOperandTypeChecker
checkOperandTypesImpl, checkSingleOperandType, getAllowedSignatures, getOperandCountRange, getOperandListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.sql.type.SqlOperandTypeChecker
and, isFixedParameters, isOptional, or, typeInference, withGeneratorMethods 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:SqlOperandTypeCheckerChecks the types of all operands to an operator call.- Specified by:
checkOperandTypesin interfaceSqlOperandTypeChecker- Specified by:
checkOperandTypesin interfaceSqlSingleOperandTypeChecker- Overrides:
checkOperandTypesin 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:
checkOperandTypesin classSameOperandTypeChecker
-
getTypeName
Description copied from class:SameOperandTypeCheckerOverride to change the behavior ofSameOperandTypeChecker.getAllowedSignatures(SqlOperator, String).- Overrides:
getTypeNamein classSameOperandTypeChecker
-
getConsistency
Description copied from interface:SqlOperandTypeCheckerReturns the strategy for making the arguments have consistency types.
-