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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
IcebergCompatMetadataValidatorAndUpdater.IcebergCompatInputContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvalidateAndUpdateIcebergCompatV2Metadata(boolean isCreatingNewTable, Metadata newMetadata, Protocol newProtocol, Optional<Protocol> prevProtocol) Validate and update the given Iceberg V2 metadata.static voidvalidateDataFileStatus(DataFileStatus dataFileStatus) Validate the givenDataFileStatusthat is being added as aaddaction to Delta Log.Methods inherited from class io.delta.kernel.internal.icebergcompat.IcebergCompatMetadataValidatorAndUpdater
isIcebergCompatEnabled
-
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 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 V2 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.
-