Package org.apache.calcite.sql.type
Interface SqlTypeMappingRule
- All Known Implementing Classes:
SqlTypeAssignmentRule
,SqlTypeCoercionRule
public interface SqlTypeMappingRule
Interface that defines rules within type mappings.
Each instance should define a type mapping matrix which actually defines the rules that indicate whether one type can apply the rule to another.
Typically, the "rule" can be type assignment or type coercion.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canApplyFrom
(SqlTypeName to, SqlTypeName from) Returns whether it is valid to apply the defined rules from typefrom
to typeto
.Map<SqlTypeName,
com.google.common.collect.ImmutableSet<SqlTypeName>> Returns the type mappings of this rule instance.
-
Method Details
-
getTypeMapping
Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> getTypeMapping()Returns the type mappings of this rule instance.The mappings should be immutable.
-
canApplyFrom
Returns whether it is valid to apply the defined rules from typefrom
to typeto
.
-