Repository navigation
fix(spec): write only v2 data_file fields in v2 manifests - #3533
Open
dannycjones wants to merge 3 commits into
Open
dannycjones wants to merge 3 commits into
dannycjones wants to merge 3 commits into
Conversation
Co-authored-by: Danny C Jones <djonesoa@amazon.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the version-specific manifest schema and serialization changes.
No open issues 🎉
What changed in this PR
Addresses #3532 by excluding V3-only fields from V2 manifest data-file schemas while preserving V3 support.
Changes:
- Separates V2 and V3 manifest schemas and serialization paths.
- Passes the requested format version through standalone data-file serialization.
- Adds field-list assertions for V1, V2, and V3 manifests and updates reader tests.
| File | Description |
|---|---|
crates/iceberg/src/spec/manifest/writer.rs |
Selects version-specific schemas and serializers; adds schema field-list tests. |
crates/iceberg/src/spec/manifest/mod.rs |
Separates V2/V3 deserialization and adjusts version-specific test fixtures. |
crates/iceberg/src/spec/manifest/entry.rs |
Removes V3-only fields from the V2 schema and adds a V3 manifest schema. |
crates/iceberg/src/spec/manifest/data_file.rs |
Uses the requested format version when serializing data files. |
crates/iceberg/src/spec/manifest/_serde.rs |
Introduces V2/V3 wrappers around shared manifest-entry serialization logic. |
Review effort: Balanced
This branch has not been deployed
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.
Which issue does this PR close?
What changes are included in this PR?
Remove V3 row lineage fields from the manifest schema.
Note, the manifest serde is reworked a little. New types are introduced for both V2 and V3, which mostly delegates to the V2V3 (renamed from V2) type. I think this makes a more consistent way to interact with these types, with the fact that they're mostly equivalent an implementation detail in the reader/writer module.
A few bits for format versions was not wired up - not really any changes but code reads correct now.
Are these changes tested?
Existing tests provide a lot of coverage. I've introduced new tests to assert the list of expected fields for V1, V2, and V3.
AI Disclosure
I proposed the change and used Claude Code to draft the changes. Reworked it a bit myself to get it into a nicer long term shape.