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.DataTypeQueryableType information that wraps a serializer that originated from aDataType.TypeInformationis a legacy class for the sole purpose of creating aTypeSerializer. This class acts as an adapter when entering or leaving the table ecosystem to other APIs where type information is required.The original
DataTypeis 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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanEqual(Object obj)org.apache.flink.api.common.typeutils.TypeSerializer<T>createSerializer(org.apache.flink.api.common.serialization.SerializerConfig config)booleanequals(Object o)intgetArity()org.apache.flink.table.types.DataTypegetDataType()intgetTotalFields()Class<T>getTypeClass()inthashCode()booleanisBasicType()booleanisKeyType()booleanisTupleType()static <T> ExternalTypeInfo<T>of(org.apache.flink.table.types.DataType dataType)Creates type information for aDataTypethat 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 aDataTypethat is possibly represented by internal data structures but serialized and deserialized into external data structures.StringtoString()
-
-
-
Method Detail
-
of
public static <T> ExternalTypeInfo<T> of(org.apache.flink.table.types.DataType dataType)
Creates type information for aDataTypethat 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 aDataTypethat 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:
getDataTypein interfaceorg.apache.flink.table.types.DataTypeQueryable
-
isBasicType
public boolean isBasicType()
- Specified by:
isBasicTypein classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
isTupleType
public boolean isTupleType()
- Specified by:
isTupleTypein classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
getArity
public int getArity()
- Specified by:
getArityin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
getTotalFields
public int getTotalFields()
- Specified by:
getTotalFieldsin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
getTypeClass
public Class<T> getTypeClass()
- Specified by:
getTypeClassin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
isKeyType
public boolean isKeyType()
- Specified by:
isKeyTypein classorg.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:
createSerializerin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
toString
public String toString()
- Specified by:
toStringin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
hashCode
public int hashCode()
- Specified by:
hashCodein classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
-