Repository navigation
fix(spec): write manifests and manifest lists with the deflate codec - #3643
Merged
Merged
Conversation
They were written without an avro.codec entry (uncompressed). Readers that assume a default for a missing entry refuse them: PyIceberg 0.12 reads it as "gzip" and raises 'Unsupported codec: gzip', so a table with one snapshot from iceberg-rust cannot be scanned from PyIceberg. Deflate is what other writers use for manifests, and it makes them smaller.
Use a shared internal factory for Avro container writers and verify codec metadata in existing round-trip tests. Co-authored-by: Copilot App <[email protected]>
kevinjqliu
reviewed
Nov 9, 2026
| apache_avro::Writer::with_codec( | ||
| schema, | ||
| writer, | ||
| apache_avro::Codec::Deflate(Default::default()), |
Contributor
There was a problem hiding this comment.
Contributor
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 10, 2026
Contributor
|
adding it back to the merge queue |
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?
ManifestWriter,ManifestListWriter, andwrite_data_files_to_avrouse a shared internal Avro writer factory withCodec::Deflateinstead ofWriter::new(noavro.codecentry, uncompressed). PyIceberg 0.12 reads a missing entry asgzipand refuses the file (apache/iceberg-python#4295), so tables with an iceberg-rust snapshot could not be scanned from PyIceberg. Deflate is also what other writers produce for manifests, and the files get smaller.Are these changes tested?
Existing manifest, manifest-list, and data-file round-trip tests also check the parsed header's
avro.codecisdeflate.cargo test -p iceberg --lib spec::manifestpasses (73);cargo clippy -p iceberg --lib --tests -- -D warningsandcargo fmt --all -- --checkpass. End to end, PyIceberg 0.12 scanned a v3 table whose second snapshot came from iceberg-rust with this change (and failed without it).AI Disclosure
Drafted with Claude Code (Claude Opus 5.5) at my direction; I ran the tests, clippy, rustfmt, ruff, and the end-to-end check described above. Follow-up factory and regression-test changes were made with GitHub Copilot (GPT-6.1 Sol). Point for reviewers: the codec is fixed rather than read from a table property; support for
write.manifest.compression-codecremains out of scope.