Interface CastRule<IN,OUT>
- Type Parameters:
IN- Input internal typeOUT- Output internal type
- All Known Subinterfaces:
CodeGeneratorCastRule<IN,,OUT> ExpressionCodeGeneratorCastRule<IN,OUT>
@Internal
public interface CastRule<IN,OUT>
A
CastRule provides the logic to create a CastExecutor starting from the input
and the target types. A rule is matched using CastRulePredicate.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanFail(org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Returns true if theCastExecutorcan fail at runtime.create(CastRule.Context context, org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Create aCastExecutorstarting from the provided input type.
-
Method Details
-
getPredicateDefinition
CastRulePredicate getPredicateDefinition() -
create
org.apache.flink.table.data.utils.CastExecutor<IN,OUT> create(CastRule.Context context, org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Create aCastExecutorstarting from the provided input type. The returnedCastExecutorassumes the input value is using the internal data type, and it's a valid value for the providedtargetLogicalType. -
canFail
default boolean canFail(org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType) Returns true if theCastExecutorcan fail at runtime.
-