Class DomainMetadataUtils

Object
io.delta.kernel.internal.util.DomainMetadataUtils

public class DomainMetadataUtils extends Object
  • Method Details

    • populateDomainMetadataMap

      public static void populateDomainMetadataMap(ColumnVector domainMetadataActionVector, Map<String,DomainMetadata> domainMetadataMap)
      Populate the map of domain metadata from actions. When encountering duplicate domain metadata actions for the same domain, this method preserves the first seen entry and skips subsequent entries. This behavior is especially useful for log replay as we want to ensure that earlier domain metadata entries take precedence over later ones.
      Parameters:
      domainMetadataActionVector - A ColumnVector containing the domain metadata rows
      domainMetadataMap - The existing map to be populated with domain metadata entries, where the key is the domain name and the value is the domain metadata
    • validateDomainMetadatas

      public static void validateDomainMetadatas(List<DomainMetadata> domainMetadataActions, Protocol protocol)
      Validates the list of domain metadata actions before committing them. It ensures that
      1. domain metadata actions are only present when supported by the table protocol
      2. there are no duplicate domain metadata actions for the same domain in the provided actions.
      Parameters:
      domainMetadataActions - The list of domain metadata actions to validate
      protocol - The protocol to check for domain metadata support