Class PlannerTypeUtils

java.lang.Object
org.apache.flink.table.runtime.types.PlannerTypeUtils

public class PlannerTypeUtils extends Object
Utilities for LogicalType and DataType..
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isAssignable(org.apache.flink.table.types.logical.LogicalType t1, org.apache.flink.table.types.logical.LogicalType t2)
    Now in the conversion to the TypeInformation from DataType, type may lose some information about nullable and precision.
    static boolean
    isInteroperable(org.apache.flink.table.types.logical.LogicalType t1, org.apache.flink.table.types.logical.LogicalType t2)
    Can the two types operate with each other.
    static boolean
    isPrimitive(org.apache.flink.table.types.logical.LogicalType type)
     
    static boolean
    isPrimitive(org.apache.flink.table.types.logical.LogicalTypeRoot root)
     
    static org.apache.flink.table.types.logical.LogicalType
    removeLegacyTypes(org.apache.flink.table.types.logical.LogicalType t)
    A conversion that removes all LegacyTypeInformationTypes by mapping to corresponding new types.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlannerTypeUtils

      public PlannerTypeUtils()
  • Method Details

    • removeLegacyTypes

      public static org.apache.flink.table.types.logical.LogicalType removeLegacyTypes(org.apache.flink.table.types.logical.LogicalType t)
      A conversion that removes all LegacyTypeInformationTypes by mapping to corresponding new types.
    • isPrimitive

      public static boolean isPrimitive(org.apache.flink.table.types.logical.LogicalType type)
    • isPrimitive

      public static boolean isPrimitive(org.apache.flink.table.types.logical.LogicalTypeRoot root)
    • isInteroperable

      public static boolean isInteroperable(org.apache.flink.table.types.logical.LogicalType t1, org.apache.flink.table.types.logical.LogicalType t2)
      Can the two types operate with each other. Such as: 1.CodeGen: equal, cast, assignment. 2.Join keys.
    • isAssignable

      public static boolean isAssignable(org.apache.flink.table.types.logical.LogicalType t1, org.apache.flink.table.types.logical.LogicalType t2)
      Now in the conversion to the TypeInformation from DataType, type may lose some information about nullable and precision. So we add this method to do a soft check.

      The difference of isInteroperable(org.apache.flink.table.types.logical.LogicalType, org.apache.flink.table.types.logical.LogicalType) is ignore precisions.