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 TypeMethodDescriptionbooleanorg.apache.flink.api.common.typeutils.TypeSerializer<T>createSerializer(org.apache.flink.api.common.serialization.SerializerConfig config) booleanintgetArity()org.apache.flink.table.types.DataTypeintinthashCode()booleanbooleanbooleanstatic <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.toString()Methods inherited from class org.apache.flink.api.common.typeinfo.TypeInformation
getGenericParameters, isSortKeyType, of, of
-
Method Details
-
of
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
- 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
- Specified by:
toStringin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-
equals
- 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>
-
canEqual
- Specified by:
canEqualin classorg.apache.flink.api.common.typeinfo.TypeInformation<T>
-