Class ValueDataTypeConverter
- java.lang.Object
-
- org.apache.flink.table.types.utils.ValueDataTypeConverter
-
@Internal public final class ValueDataTypeConverter extends Object
Value-based data type extractor that supports extraction of clearly identifiable data types for input conversion.This converter is more precise than
ClassDataTypeConverterbecause it also considers nullability, length, precision, and scale of values.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<DataType>extractDataType(Object value)Returns the clearly identifiable data type if possible.
-
-
-
Method Detail
-
extractDataType
public static Optional<DataType> extractDataType(Object value)
Returns the clearly identifiable data type if possible. For example,12Lcan be expressed asDataTypes.BIGINT().notNull(). However, for example,nullcould be any type and is not supported.All types of the
LogicalTypeFamily.PREDEFINEDfamily, symbols, and arrays are supported.
-
-