Class InternalTypeInfo<T>
- Type Parameters:
T- internal data structure
- All Implemented Interfaces:
Serializable,org.apache.flink.table.types.DataTypeQueryable
LogicalType.
TypeInformation is a legacy class for the sole purpose of creating a TypeSerializer. Instances of TypeInformation are not required in the table ecosystem but
sometimes enforced by interfaces of other modules (such as Transformation). Therefore, this class acts as an adapter whenever type
information is required.
Use of(LogicalType) for type information of internal data structures.
Note: Instances of this class should only be created for passing it to interfaces that require
type information. This class should not be used as a replacement for a LogicalType.
Information such as the arity of a row type, field types, field names, etc. should be derived
from the LogicalType directly.
The original LogicalType 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.
- 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> InternalTypeInfo<T>of(org.apache.flink.table.types.logical.LogicalType type) Creates type information for aLogicalTypethat is represented by internal data structures.static InternalTypeInfo<org.apache.flink.table.data.RowData>of(org.apache.flink.table.types.logical.RowType type) Creates type information for aRowTyperepresented by internal data structures.static InternalTypeInfo<org.apache.flink.table.data.RowData>ofFields(org.apache.flink.table.types.logical.LogicalType... fieldTypes) Creates type information forRowTyperepresented by internal data structures.static InternalTypeInfo<org.apache.flink.table.data.RowData>Creates type information forRowTyperepresented by internal data structures.org.apache.flink.table.types.logical.LogicalTypeString[]Deprecated.org.apache.flink.table.types.logical.LogicalType[]Deprecated.TypeInformationshould just be a thin wrapper of a serializer.intDeprecated.TypeInformationshould just be a thin wrapper of a serializer.org.apache.flink.table.types.logical.RowTypeorg.apache.flink.api.common.typeutils.TypeSerializer<T>toString()Methods inherited from class org.apache.flink.api.common.typeinfo.TypeInformation
getGenericParameters, isSortKeyType, of, of
-
Method Details
-
of
Creates type information for aLogicalTypethat is represented by internal data structures. -
of
public static InternalTypeInfo<org.apache.flink.table.data.RowData> of(org.apache.flink.table.types.logical.RowType type) Creates type information for aRowTyperepresented by internal data structures. -
ofFields
public static InternalTypeInfo<org.apache.flink.table.data.RowData> ofFields(org.apache.flink.table.types.logical.LogicalType... fieldTypes) Creates type information forRowTyperepresented by internal data structures. -
ofFields
public static InternalTypeInfo<org.apache.flink.table.data.RowData> ofFields(org.apache.flink.table.types.logical.LogicalType[] fieldTypes, String[] fieldNames) Creates type information forRowTyperepresented by internal data structures. -
toLogicalType
public org.apache.flink.table.types.logical.LogicalType toLogicalType() -
toSerializer
-
toRowType
public org.apache.flink.table.types.logical.RowType toRowType() -
toRowSerializer
-
toRowFieldTypes
Deprecated.TypeInformationshould just be a thin wrapper of a serializer. This method only exists for legacy code. It is recommended to use theRowTypeinstead for logical operations. -
toRowFieldNames
Deprecated.TypeInformationshould just be a thin wrapper of a serializer. This method only exists for legacy code. It is recommended to use theRowTypeinstead for logical operations. -
toRowSize
Deprecated.TypeInformationshould just be a thin wrapper of a serializer. This method only exists for legacy code. It is recommended to use theRowTypeinstead for logical operations. -
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>
-
TypeInformationshould just be a thin wrapper of a serializer.