Class IcebergCompatV2MetadataValidatorAndUpdater

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

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

    • IcebergCompatV2MetadataValidatorAndUpdater

      public IcebergCompatV2MetadataValidatorAndUpdater()
  • Method Details

    • validateAndUpdateIcebergCompatV2Metadata

      public static Optional<Metadata> validateAndUpdateIcebergCompatV2Metadata(boolean isCreatingNewTable, Metadata newMetadata, Protocol newProtocol, Optional<Protocol> prevProtocol)
      Validate and update the given Iceberg V2 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 V2 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.