@Internal public final class ValueDataTypeConverter extends Object
This converter is more precise than ClassDataTypeConverter because it also considers
nullability, length, precision, and scale of values.
| Modifier and Type | Method and Description |
|---|---|
static Optional<DataType> |
extractDataType(Object value)
Returns the clearly identifiable data type if possible.
|
public static Optional<DataType> extractDataType(Object value)
12L can be
expressed as DataTypes.BIGINT().notNull(). However, for example, null could
be any type and is not supported.
All types of the LogicalTypeFamily.PREDEFINED family, symbols, and arrays are
supported.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.