Class DomainMetadata

Object
io.delta.kernel.internal.actions.DomainMetadata

public class DomainMetadata extends Object
Delta log action representing an `DomainMetadata` action
  • Field Details

  • Constructor Details

    • DomainMetadata

      public DomainMetadata(String domain, String configuration, boolean removed)
      The domain metadata action contains a configuration string for a named metadata domain. Two overlapping transactions conflict if they both contain a domain metadata action for the same metadata domain. Per-domain conflict resolution logic can be implemented.
      Parameters:
      domain - A string used to identify a specific domain.
      configuration - A string containing configuration for the metadata domain.
      removed - If it is true it serves as a tombstone to logically delete a DomainMetadata action.
  • Method Details

    • isUserControlledDomain

      public static boolean isUserControlledDomain(String domain)
      Whether the provided domain is a user-controlled domain
    • isSystemDomainSupportedSetFromTxn

      public static boolean isSystemDomainSupportedSetFromTxn(String domain)
      Checks whether the provided domain is a system domain that is supported for set in a Delta transaction via addDomainMetadata.

      By default, system domains are not allowed to be set through transaction-level domain metadata due to their reserved nature. However, there are specific system domains—such as RowTrackingMetadataDomain.DOMAIN_NAME—that are explicitly allowed to be set in this context. This method defines the allowlist of such supported domains and checks against it.

    • fromColumnVector

      public static DomainMetadata fromColumnVector(ColumnVector vector, int rowId)
    • fromRow

      public static DomainMetadata fromRow(Row row)
      Creates a DomainMetadata instance from a Row with the schema being FULL_SCHEMA.
      Parameters:
      row - the Row object containing the DomainMetadata action
      Returns:
      a DomainMetadata instance or null if the row is null
      Throws:
      IllegalArgumentException - if the schema of the row does not match FULL_SCHEMA
    • getDomain

      public String getDomain()
    • getConfiguration

      public String getConfiguration()
    • isRemoved

      public boolean isRemoved()
    • toRow

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

      public DomainMetadata removed()
    • toString

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object