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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
IcebergCompatMetadataValidatorAndUpdater.IcebergCompatInputContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidateAndUpdateIcebergCompatV3Metadata(boolean isCreatingNewTable, Metadata newMetadata, Protocol newProtocol, Optional<Protocol> prevProtocol) Validate and update the given Iceberg V3 metadata.static voidvalidateDataFileStatus(DataFileStatus dataFileStatus) Validate the givenDataFileStatusthat is being added as aaddaction to Delta Log.static voidValidates that any change to propertyTableConfig.ICEBERG_COMPAT_V3_ENABLEDis valid.Methods inherited from class io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
isIcebergCompatEnabled
-
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 propertyTableConfig.ICEBERG_COMPAT_V3_ENABLEDis valid. Currently, the changes we support are- No change in enablement (true to true or false to false)
KernelExceptionare- 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 updatesnewProtocol- 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
Validate the givenDataFileStatusthat is being added as aaddaction to Delta Log. Currently, it checks that the statistics are not empty.- Parameters:
dataFileStatus- TheDataFileStatusto validate.
-