Class Metadata

Object
io.delta.kernel.internal.actions.Metadata
All Implemented Interfaces:
Serializable

public class Metadata extends Object implements Serializable
See Also:
  • Field Details

    • FULL_SCHEMA

      public static final StructType FULL_SCHEMA
  • Constructor Details

  • Method Details

    • fromRow

      public static Metadata fromRow(Row row)
    • fromColumnVector

      public static Metadata fromColumnVector(ColumnVector vector, int rowId)
    • withMergedConfiguration

      public Metadata withMergedConfiguration(Map<String,String> configuration)
      Returns a new metadata object that has a new configuration which is the combination of its current configuration and configuration.

      For overlapping keys the values from configuration take precedence.

    • withConfigurationKeysUnset

      public Metadata withConfigurationKeysUnset(Set<String> keysToUnset)
      Returns a new metadata object that has a new configuration which does not contain any of the keys provided in keysToUnset.
    • withReplacedConfiguration

      public Metadata withReplacedConfiguration(Map<String,String> newConfiguration)
      Returns a new Metadata object with the configuration provided with newConfiguration (any prior configuration is replaced).
    • withNewSchema

      public Metadata withNewSchema(StructType schema)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSchemaString

      public String getSchemaString()
    • getSchema

      public StructType getSchema()
    • getPartitionColumns

      public ArrayValue getPartitionColumns()
    • getPartitionColNames

      public Set<String> getPartitionColNames()
      Set of lowercase partition column names
    • getDataSchema

      public StructType getDataSchema()
      The logical data schema which excludes partition columns
    • getId

      public String getId()
    • getName

      public Optional<String> getName()
    • getDescription

      public Optional<String> getDescription()
    • getFormat

      public Format getFormat()
    • getCreatedTime

      public Optional<Long> getCreatedTime()
    • getConfigurationMapValue

      public MapValue getConfigurationMapValue()
    • getConfiguration

      public Map<String,String> getConfiguration()
    • getPhysicalSchema

      public StructType getPhysicalSchema()
      The full schema (including partition columns) with the field names converted to their physical names (column names used in the data files) based on the table's column mapping mode. When column mapping mode is ID, fieldId metadata is preserved in the field metadata; all column metadata is otherwise removed.
    • filterOutUnchangedProperties

      public Map<String,String> filterOutUnchangedProperties(Map<String,String> newProperties)
      Filter out the key-value pair matches exactly with the old properties.
      Parameters:
      newProperties - the new properties to be filtered
      Returns:
      the filtered properties
    • toRow

      public Row toRow()
      Encode as a Row object with the schema FULL_SCHEMA.
      Returns:
      Row object with the schema FULL_SCHEMA
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object