Class ExternalTypeInfo<T>

java.lang.Object
org.apache.flink.api.common.typeinfo.TypeInformation<T>
org.apache.flink.table.runtime.typeutils.ExternalTypeInfo<T>
Type Parameters:
T - external data structure
All Implemented Interfaces:
Serializable, org.apache.flink.table.types.DataTypeQueryable

@Internal public final class ExternalTypeInfo<T> extends org.apache.flink.api.common.typeinfo.TypeInformation<T> implements org.apache.flink.table.types.DataTypeQueryable
Type information that wraps a serializer that originated from a DataType.

TypeInformation is a legacy class for the sole purpose of creating a TypeSerializer. This class acts as an adapter when entering or leaving the table ecosystem to other APIs where type information is required.

The original DataType is stored in every instance (for access during pre-flight phase and planning) but has no effect on equality because only serialization matters during runtime.

Note: This class is incomplete yet and only supports RAW types. But will be updated to support all kinds of data types in the future.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.apache.flink.api.common.typeutils.TypeSerializer<T>
    createSerializer(org.apache.flink.api.common.serialization.SerializerConfig config)
     
    boolean
     
    int
     
    org.apache.flink.table.types.DataType
     
    int
     
     
    int
     
    boolean
     
    boolean
     
    boolean
     
    static <T> ExternalTypeInfo<T>
    of(org.apache.flink.table.types.DataType dataType)
    Creates type information for a DataType that is possibly represented by internal data structures but serialized and deserialized into external data structures.
    static <T> ExternalTypeInfo<T>
    of(org.apache.flink.table.types.DataType dataType, boolean isInternalInput)
    Creates type information for a DataType that is possibly represented by internal data structures but serialized and deserialized into external data structures.
     

    Methods inherited from class org.apache.flink.api.common.typeinfo.TypeInformation

    getGenericParameters, isSortKeyType, of, of

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • of

      public static <T> ExternalTypeInfo<T> of(org.apache.flink.table.types.DataType dataType)
      Creates type information for a DataType that is possibly represented by internal data structures but serialized and deserialized into external data structures.
    • of

      public static <T> ExternalTypeInfo<T> of(org.apache.flink.table.types.DataType dataType, boolean isInternalInput)
      Creates type information for a DataType that is possibly represented by internal data structures but serialized and deserialized into external data structures.
      Parameters:
      isInternalInput - allows for a non-bidirectional serializer from internal to external
    • getDataType

      public org.apache.flink.table.types.DataType getDataType()
      Specified by:
      getDataType in interface org.apache.flink.table.types.DataTypeQueryable
    • isBasicType

      public boolean isBasicType()
      Specified by:
      isBasicType in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • isTupleType

      public boolean isTupleType()
      Specified by:
      isTupleType in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • getArity

      public int getArity()
      Specified by:
      getArity in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • getTotalFields

      public int getTotalFields()
      Specified by:
      getTotalFields in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • getTypeClass

      public Class<T> getTypeClass()
      Specified by:
      getTypeClass in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • isKeyType

      public boolean isKeyType()
      Specified by:
      isKeyType in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • createSerializer

      public org.apache.flink.api.common.typeutils.TypeSerializer<T> createSerializer(org.apache.flink.api.common.serialization.SerializerConfig config)
      Specified by:
      createSerializer in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • toString

      public String toString()
      Specified by:
      toString in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.flink.api.common.typeinfo.TypeInformation<T>
    • canEqual

      public boolean canEqual(Object obj)
      Specified by:
      canEqual in class org.apache.flink.api.common.typeinfo.TypeInformation<T>