Interface AbstractDataType<T extends AbstractDataType<T>>

Type Parameters:
T - kind of data type returned after mutation
All Known Implementing Classes:
AtomicDataType, CollectionDataType, DataType, FieldsDataType, KeyValueDataType, UnresolvedDataType

@PublicEvolving public interface AbstractDataType<T extends AbstractDataType<T>>
Highest abstraction that describes the data type of a value in the table ecosystem. This class describes two kinds of data types:

Fully resolved data types that can be used directly to declare input and/or output types of operations. This kind is represented in subclasses of DataType.

Partially resolved data types that can be resolved to DataType but require a lookup in a catalog or configuration first. This kind is represented in subclasses of UnresolvedDataType.

Note: Use DataTypes for producing instances of this class.

  • Method Summary

    Modifier and Type
    Method
    Description
    bridgedTo(Class<?> newConversionClass)
    Adds a hint that data should be represented using the given class when entering or leaving the table ecosystem.
    Adds a hint that null values are not expected in the data for this type.
    Adds a hint that null values are expected in the data for this type (default behavior).
  • Method Details

    • notNull

      T notNull()
      Adds a hint that null values are not expected in the data for this type.
      Returns:
      a new, reconfigured data type instance
    • nullable

      T nullable()
      Adds 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 notNull().

      Returns:
      a new, reconfigured data type instance
    • bridgedTo

      T bridgedTo(Class<?> newConversionClass)
      Adds 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.

      Returns:
      a new, reconfigured data type instance