Class MapType

Object
io.delta.kernel.types.DataType
io.delta.kernel.types.MapType

@Evolving public class MapType extends DataType
Data type representing a map type.
Since:
3.0.0
  • Field Details

  • Constructor Details

  • Method Details

    • getKeyField

      public StructField getKeyField()
    • getValueField

      public StructField getValueField()
    • getKeyType

      public DataType getKeyType()
    • getValueType

      public DataType getValueType()
    • isValueContainsNull

      public boolean isValueContainsNull()
    • equivalent

      public boolean equivalent(DataType dataType)
      Description copied from class: DataType
      Are the data types same? The metadata, collations or column names could be different.

      Should be used for schema comparisons during schema evolution.

      Overrides:
      equivalent in class DataType
      Parameters:
      dataType -
      Returns:
    • isWriteCompatible

      public boolean isWriteCompatible(DataType dataType)
      Checks whether the given dataType is compatible with this type when writing data. Collation differences are ignored.

      This method is intended to be used during the write path to validate that an input type matches the expected schema before data is written.

      It should not be used in other cases, such as the read path.

      Overrides:
      isWriteCompatible in class DataType
      Parameters:
      dataType - the input data type being written
      Returns:
      true if the input type is compatible with this type.
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in class DataType
    • isNested

      public boolean isNested()
      Description copied from class: DataType
      Returns true iff this data is a nested data type (it logically parameterized by other types).

      For example StructType, ArrayType, MapType are nested data types.

      Specified by:
      isNested in class DataType
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class DataType
    • toString

      public String toString()
      Specified by:
      toString in class DataType