Package org.apache.calcite.sql.type
Interface ImplicitCastOperandTypeChecker
- All Known Implementing Classes:
FamilyOperandTypeChecker
,OperandMetadataImpl
public interface ImplicitCastOperandTypeChecker
An operand type checker that supports implicit type cast, see
TypeCoercion.builtinFunctionCoercion(SqlCallBinding, List, List)
for details.-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkOperandTypesWithoutTypeCoercion
(SqlCallBinding callBinding, boolean throwOnFailure) Checks the types of an operator's all operands, but without type coercion.getOperandSqlTypeFamily
(int iFormalOperand) Get the operand SqlTypeFamily of formal indexiFormalOperand
.
-
Method Details
-
checkOperandTypesWithoutTypeCoercion
Checks the types of an operator's all operands, but without type coercion. This is mainly used as a pre-check when this checker is included as one of the rules inCompositeOperandTypeChecker
and the composite predicate is `OR`.- 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
-
getOperandSqlTypeFamily
Get the operand SqlTypeFamily of formal indexiFormalOperand
. This is mainly used to get the operand SqlTypeFamily when this checker is included as one of the rules inCompositeOperandTypeChecker
and the composite predicate is `SEQUENCE`.- Parameters:
iFormalOperand
- the formal operand index.- Returns:
- SqlTypeFamily of the operand.
-