Class CollectionDataType

java.lang.Object
org.apache.flink.table.types.DataType
org.apache.flink.table.types.CollectionDataType
All Implemented Interfaces:
Serializable, AbstractDataType<DataType>

@PublicEvolving public final class CollectionDataType extends DataType
A data type that contains an element type (e.g. ARRAY or MULTISET).
See Also:
  • Constructor Details

    • CollectionDataType

      public CollectionDataType(LogicalType logicalType, @Nullable Class<?> conversionClass, DataType elementDataType)
    • CollectionDataType

      public CollectionDataType(LogicalType logicalType, DataType elementDataType)
  • Method Details

    • getElementDataType

      public DataType getElementDataType()
    • notNull

      public DataType notNull()
      Description copied from interface: AbstractDataType
      Adds a hint that null values are not expected in the data for this type.
      Returns:
      a new, reconfigured data type instance
    • nullable

      public DataType nullable()
      Description copied from interface: AbstractDataType
      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 AbstractDataType.notNull().

      Returns:
      a new, reconfigured data type instance
    • bridgedTo

      public DataType bridgedTo(Class<?> newConversionClass)
      Description copied from interface: AbstractDataType
      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
    • getChildren

      public List<DataType> getChildren()
      Description copied from class: DataType
      Returns the children of this data type, if any. Returns an empty list if this data type is atomic.
      Specified by:
      getChildren in class DataType
      Returns:
      the children data types
    • accept

      public <R> R accept(DataTypeVisitor<R> visitor)
      Specified by:
      accept in class DataType
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class DataType
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DataType