Read manifests with V3 projection#3690
Open
KaiqiJinWow wants to merge 3 commits into
Open
Conversation
Read manifest entries and manifest lists with the latest supported schema so V3-only fields are retained while older manifests resolve missing fields to null.
Exclude V3-only properties from V1 and V2 fastavro comparisons and clarify the latest read-version constant name.
Exclude V3-only properties from the reflected V2 manifest dictionary used by the REST integration test.
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.
Rationale for this change
V3 manifest schemas are defined, but manifest entries and manifest lists are still read with the V2 projection. Avro schema resolution therefore drops V3-only fields such as
first_row_id,referenced_data_file,content_offset, andcontent_size_in_bytesbefore they reachDataFileandManifestFile.Read manifests with the latest supported projection while retaining the V2 layout as the default for constructors and writers. V1 and V2 manifests remain compatible because their missing V3 fields resolve to null.
This isolates the read-side concern raised in #3624 from its V3 writer work and is a prerequisite for #3478 to consume deletion-vector content ranges from catalog manifests.
Are these changes tested?
Yes.
first_row_id.pytest tests/avro/test_file.py tests/utils/test_manifest.py: 50 passed.datafusionandpyiceberg-coreextras were excluded.Are there any user-facing changes?
No. This fixes internal manifest deserialization and prepares V3 read support without changing behavior for currently supported V1 and V2 tables.