Package org.apache.flink.table.types
Class UnresolvedDataType
java.lang.Object
org.apache.flink.table.types.UnresolvedDataType
- All Implemented Interfaces:
AbstractDataType<UnresolvedDataType>
@PublicEvolving
public final class UnresolvedDataType
extends Object
implements AbstractDataType<UnresolvedDataType>
Partially resolved data type that requires a lookup in a catalog or configuration before creating
the corresponding
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 Summary
ConstructorsConstructorDescriptionUnresolvedDataType(Supplier<String> description, Function<DataTypeFactory, DataType> resolutionFactory) -
Method Summary
Modifier and TypeMethodDescriptionAdds a hint that data should be represented using the given class when entering or leaving the table ecosystem.notNull()Adds a hint that null values are not expected in the data for this type.nullable()Adds a hint that null values are expected in the data for this type (default behavior).toDataType(DataTypeFactory factory) Converts this instance to a resolvedDataTypepossibly enriched with additional nullability and conversion class information.toString()
-
Constructor Details
-
UnresolvedDataType
public UnresolvedDataType(Supplier<String> description, Function<DataTypeFactory, DataType> resolutionFactory)
-
-
Method Details
-
toDataType
Converts this instance to a resolvedDataTypepossibly enriched with additional nullability and conversion class information. -
notNull
Description copied from interface:AbstractDataTypeAdds a hint that null values are not expected in the data for this type.- Specified by:
notNullin interfaceAbstractDataType<UnresolvedDataType>- Returns:
- a new, reconfigured data type instance
-
nullable
Description copied from interface:AbstractDataTypeAdds a hint that null values are expected in the data for this type (default behavior).This method exists for explicit declaration of the default behavior or for invalidation of a previous call to
AbstractDataType.notNull().- Specified by:
nullablein interfaceAbstractDataType<UnresolvedDataType>- Returns:
- a new, reconfigured data type instance
-
bridgedTo
Description copied from interface:AbstractDataTypeAdds a hint that data should be represented using the given class when entering or leaving the table ecosystem.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.- Specified by:
bridgedToin interfaceAbstractDataType<UnresolvedDataType>- Returns:
- a new, reconfigured data type instance
-
toString
-