Class ClassDataTypeConverter
- java.lang.Object
-
- org.apache.flink.table.types.utils.ClassDataTypeConverter
-
@Internal public final class ClassDataTypeConverter extends Object
Class-based data type extractor that supports extraction of clearly identifiable data types for input and output conversion.Note: In most of the cases,
DataTypeExtractoris more useful as it also considers structured types and type variables possibly annotated withDataTypeHint.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<DataType>extractDataType(Class<?> clazz)Returns the clearly identifiable data type if possible.
-
-
-
Method Detail
-
extractDataType
public static Optional<DataType> extractDataType(Class<?> clazz)
Returns the clearly identifiable data type if possible. For example,Longcan be expressed asDataTypes.BIGINT(). However, for example,Rowcannot be extracted as information about the fields is missing. OrBigDecimalneeds to be mapped from a variable precision/scale to constant ones.
-
-