Skip to content

fix(spec): write only v2 data_file fields in v2 manifests - #3533

Open
dannycjones wants to merge 3 commits into
apache:mainfrom
dannycjones:fix/row-lineage-v1-v2-metadata
Open

dannycjones wants to merge 3 commits into
apache:mainfrom
dannycjones:fix/row-lineage-v1-v2-metadata

Conversation

@dannycjones

Copy link
Copy Markdown
Contributor

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.

@dannycjones
dannycjones marked this pull request as ready for review October 28, 2026 00:28
Copilot AI balanced review requested due to automatic review settings October 28, 2026 00:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V2 manifest entry data file struct schema has V3 fields defined, although never produced

2 participants