Class IcebergWriterCompatV3MetadataValidatorAndUpdater

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

public class IcebergWriterCompatV3MetadataValidatorAndUpdater extends IcebergCompatMetadataValidatorAndUpdater
  • Constructor Details

    • IcebergWriterCompatV3MetadataValidatorAndUpdater

      public IcebergWriterCompatV3MetadataValidatorAndUpdater()
  • Method Details

    • validateIcebergWriterCompatV3Change

      public static void validateIcebergWriterCompatV3Change(Map<String,String> oldConfig, Map<String,String> newConfig)
      Validates that any change to property TableConfig.ICEBERG_WRITER_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)
    • validateAndUpdateIcebergWriterCompatV3Metadata

      public static Optional<Metadata> validateAndUpdateIcebergWriterCompatV3Metadata(boolean isCreatingNewTable, Metadata newMetadata, Protocol newProtocol, Optional<Protocol> prevProtocol)
      Validate and update the given Iceberg Writer Compat 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 Writer V3 requirements