Class IcebergCompatMetadataValidatorAndUpdater

Object
io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
Direct Known Subclasses:
IcebergCompatV2MetadataValidatorAndUpdater, IcebergCompatV3MetadataValidatorAndUpdater, IcebergWriterCompatV1MetadataValidatorAndUpdater, IcebergWriterCompatV3MetadataValidatorAndUpdater

public abstract class IcebergCompatMetadataValidatorAndUpdater extends Object
Contains interfaces and common utility classes for defining the iceberg conversion compatibility checks and metadata updates.

Main class is IcebergCompatMetadataValidatorAndUpdater which takes:

  • TableConfig to check if the table is enabled iceberg compat property enabled. When enabled, the metadata will be validated and updated.
  • List of TableFeatures expected to be supported by the protocol
  • List of IcebergCompatMetadataValidatorAndUpdater.IcebergCompatRequiredTablePropertyEnforcer that enforce certain properties must be set for IcebergV2 compatibility. If the property is not set, we will set it to a default value. It will also update the metadata to make it compatible with Iceberg compat version targeted.
  • List of IcebergCompatMetadataValidatorAndUpdater.IcebergCompatCheck to validate the metadata and protocol. The checks can be like what are the table features not supported and in what cases a certain table feature is supported (e.g. type widening is enabled, but iceberg compat only if the widening is supported in the Iceberg).
  • Constructor Details

    • IcebergCompatMetadataValidatorAndUpdater

      public IcebergCompatMetadataValidatorAndUpdater()
  • Method Details

    • isIcebergCompatEnabled

      public static Boolean isIcebergCompatEnabled(Metadata metadata)
      Returns whether Iceberg compatibility is enabled for the given table metadata. This checks if either `icebergCompatV2` or `icebergCompatV3` table property is enabled.
      Parameters:
      metadata - The table metadata to check.
      Returns:
      true if either Iceberg compatibility V2 or V3 is enabled; false otherwise.