Class LegacyTypeInfoDataTypeConverter
java.lang.Object
org.apache.flink.table.types.utils.LegacyTypeInfoDataTypeConverter
Deprecated.
Converter between
TypeInformation and DataType that reflects the behavior before
Flink 1.9. The conversion is a 1:1 mapping that allows back-and-forth conversion. Note that
nullability constraints might get lost during the back-and-forth conversion.
This converter only exists to still support deprecated methods that take or return TypeInformation. Some methods will still support type information in the future, however, the
future type information support will integrate nicer with the new type stack.
This converter reflects the old behavior that includes:
- Use old
java.sql.*time classes for time data types. - Only support millisecond precision for timestamps or day-time intervals.
- Let variable precision and scale for decimal types pass through the planner.
- Inconsistent nullability. Most types are nullable even though type information does not support it.
- Distinction between
BasicArrayTypeInfoandObjectArrayTypeInfo. - Let POJOs, case classes, and tuples pass through the planner.
Any changes here need to be applied to the legacy planner as well.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataTypetoDataType(org.apache.flink.api.common.typeinfo.TypeInformation<?> typeInfo) Deprecated.static org.apache.flink.api.common.typeinfo.TypeInformation<?>toLegacyTypeInfo(DataType dataType) Deprecated.
-
Method Details
-
toDataType
Deprecated. -
toLegacyTypeInfo
public static org.apache.flink.api.common.typeinfo.TypeInformation<?> toLegacyTypeInfo(DataType dataType) Deprecated.
-
DataTypeFactory.createDataType(TypeInformation)instead. Note that this method will not create legacy types anymore. It fully uses the new type system available only in the planner.