Class IcebergCompatV3MetadataValidatorAndUpdater

Object
io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
io.delta.kernel.internal.icebergcompat.IcebergCompatV3MetadataValidatorAndUpdater

public class IcebergCompatV3MetadataValidatorAndUpdater extends IcebergCompatMetadataValidatorAndUpdater
Utility methods for validation and compatibility checks for Iceberg V3.
  • Constructor Details

    • IcebergCompatV3MetadataValidatorAndUpdater

      public IcebergCompatV3MetadataValidatorAndUpdater()
  • Method Details

    • validateIcebergCompatV3Change

      public static void validateIcebergCompatV3Change(Map<String,String> oldConfig, Map<String,String> newConfig)
      Validates that any change to property TableConfig.ICEBERG_COMPAT_V3_ENABLED is valid. Currently, the changes we support are
      • No change in enablement (true to true or false to false)
      The changes that we do not support and for which we throw an KernelException are
      • Disabling on an existing table (true to false)
      • Enabling on an existing table (false to true)
    • validateAndUpdateIcebergCompatV3Metadata

      public static Optional<Metadata> validateAndUpdateIcebergCompatV3Metadata(boolean isCreatingNewTable, Metadata newMetadata, Protocol newProtocol, Optional<Protocol> prevProtocol)
      Validate and update the given Iceberg V3 metadata.
      Parameters:
      newMetadata - Metadata after the current updates
      newProtocol - Protocol after the current updates
      Returns:
      The updated metadata if the metadata is valid and updated, otherwise empty.
      Throws:
      UnsupportedOperationException - if the metadata is not compatible with Iceberg V3 requirements
    • validateDataFileStatus

      public static void validateDataFileStatus(DataFileStatus dataFileStatus)
      Validate the given DataFileStatus that is being added as a add action to Delta Log. Currently, it checks that the statistics are not empty.
      Parameters:
      dataFileStatus - The DataFileStatus to validate.