@PublicEvolving public final class UnresolvedDataType extends Object implements AbstractDataType<UnresolvedDataType>
LogicalType
.
Users are able to influence the nullability and conversion class even if the actual LogicalType
is not fully known yet. The information is stored and verified when resolving to
DataType
lazily.
Constructor and Description |
---|
UnresolvedDataType(java.util.function.Supplier<String> description,
java.util.function.Function<DataTypeFactory,DataType> resolutionFactory) |
Modifier and Type | Method and Description |
---|---|
UnresolvedDataType |
bridgedTo(Class<?> newConversionClass)
Adds a hint that data should be represented using the given class when entering or leaving
the table ecosystem.
|
UnresolvedDataType |
notNull()
Adds a hint that null values are not expected in the data for this type.
|
UnresolvedDataType |
nullable()
Adds a hint that null values are expected in the data for this type (default behavior).
|
DataType |
toDataType(DataTypeFactory factory)
Converts this instance to a resolved
DataType possibly enriched with additional
nullability and conversion class information. |
String |
toString() |
public UnresolvedDataType(java.util.function.Supplier<String> description, java.util.function.Function<DataTypeFactory,DataType> resolutionFactory)
public DataType toDataType(DataTypeFactory factory)
DataType
possibly enriched with additional
nullability and conversion class information.public UnresolvedDataType notNull()
AbstractDataType
notNull
in interface AbstractDataType<UnresolvedDataType>
public UnresolvedDataType nullable()
AbstractDataType
This method exists for explicit declaration of the default behavior or for invalidation of
a previous call to AbstractDataType.notNull()
.
nullable
in interface AbstractDataType<UnresolvedDataType>
public UnresolvedDataType bridgedTo(Class<?> newConversionClass)
AbstractDataType
A supported conversion class depends on the logical type and its nullability property.
Please see the implementation of LogicalType.supportsInputConversion(Class)
,
LogicalType.supportsOutputConversion(Class)
, or the documentation for more
information about supported conversions.
bridgedTo
in interface AbstractDataType<UnresolvedDataType>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.