[iceberg] Write required Avro metadata to manifest files - #10329
Draft
hutiefang76 wants to merge 1 commit into
Draft
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Newly written Iceberg manifests include the required Avro metadata:
schema,schema-id,partition-spec,partition-spec-id,format-version, andcontent. Readers can resolve the schema and partition spec from the file headers. Previously, onlyavro.schemaandavro.codecwere present.Fixes #8440.
Related: #9497.
The writer factory exposes an opt-in file-metadata capability, keeping
paimon-coreindependent of the Avro implementation. Metadata is set before the Avro header is written. Each manifest writer receives its owndataordeletescontent value, andpartition-specis serialized as the required field array.This draft retains the existing schema and metrics field IDs. Existing headerless manifests are not rewritten; legacy-manifest migration and field-ID remapping are outside this change.
Tests
AvroFileFormatTest, 48IcebergCompatibilityTest, 8IcebergManifestBlockSizeTest, and 3IcebergDVCompatibilityTesttests passed (115 total).git diff --checkpassed for the final change.