Package io.delta.kernel.internal.util
Class DomainMetadataUtils
Object
io.delta.kernel.internal.util.DomainMetadataUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidpopulateDomainMetadataMap(ColumnVector domainMetadataActionVector, Map<String, DomainMetadata> domainMetadataMap) Populate the map of domain metadata from actions.static voidvalidateDomainMetadatas(List<DomainMetadata> domainMetadataActions, Protocol protocol) Validates the list of domain metadata actions before committing them.
-
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- AColumnVectorcontaining the domain metadata rowsdomainMetadataMap- 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- domain metadata actions are only present when supported by the table protocol
- there are no duplicate domain metadata actions for the same domain in the provided actions.
- Parameters:
domainMetadataActions- The list of domain metadata actions to validateprotocol- The protocol to check for domain metadata support
-