Interface CastRule<IN,OUT>

Type Parameters:
IN - Input internal type
OUT - 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
    Modifier and Type
    Interface
    Description
    static interface 
    Casting context.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    canFail(org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType)
    Returns true if the CastExecutor can fail at runtime.
    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 a CastExecutor starting from the provided input type.
     
  • Method Details

    • getPredicateDefinition

      CastRulePredicate getPredicateDefinition()
      See Also:
    • 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 a CastExecutor starting from the provided input type. The returned CastExecutor assumes the input value is using the internal data type, and it's a valid value for the provided targetLogicalType.
    • canFail

      default boolean canFail(org.apache.flink.table.types.logical.LogicalType inputLogicalType, org.apache.flink.table.types.logical.LogicalType targetLogicalType)
      Returns true if the CastExecutor can fail at runtime.