Conversation
PyIceberg did not compress the Avro. This will make gzip/deflate the same as in Java.
ndrluis
reviewed
May 7, 2025
sungwy
approved these changes
May 23, 2025
Comment on lines
+133
to
+135
| self._compression = self._transaction.table_metadata.properties.get( # type: ignore | ||
| TableProperties.WRITE_AVRO_COMPRESSION, TableProperties.WRITE_AVRO_COMPRESSION_DEFAULT | ||
| ) |
Collaborator
There was a problem hiding this comment.
I think little things like table property parsing has gotten us unexpectedly in the past - would it be possible to add a few cases that demonstrate:
- that the newly written manifests now have the new default compression when a new snapshot is committed?
- and that newly written manifests respect a compression codec value when the property is set, when a new snapshot is committed?
I think this would help us add coverage for the new parameter both in property parsing and the simple logic here in update.snapshots module in each functions
Contributor
Author
There was a problem hiding this comment.
That's a good point @sungwy, and indeed that caught us in the past. I've added the test that you suggested, let me know what you think 👍
Contributor
Author
amitgilad3
pushed a commit
to amitgilad3/iceberg-python
that referenced
this pull request
Jul 7, 2025
# Rationale for this change PyIceberg did not compress the Avro. This will make gzip/deflate the same as in Java. # Are these changes tested? Existing round-trip tests with FastAvro and Spark. Some tests are extended to both write compressed and uncompressed data. # Are there any user-facing changes? Smaller and faster manifest files :) <!-- In the case of user-facing changes, please add the changelog label. -->
gabeiglio
pushed a commit
to Netflix/iceberg-python
that referenced
this pull request
Aug 13, 2025
# Rationale for this change PyIceberg did not compress the Avro. This will make gzip/deflate the same as in Java. # Are these changes tested? Existing round-trip tests with FastAvro and Spark. Some tests are extended to both write compressed and uncompressed data. # Are there any user-facing changes? Smaller and faster manifest files :) <!-- In the case of user-facing changes, please add the changelog label. -->
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
PyIceberg did not compress the Avro. This will make gzip/deflate the same as in Java.
Are these changes tested?
Existing round-trip tests with FastAvro and Spark. Some tests are extended to both write compressed and uncompressed data.
Are there any user-facing changes?
Smaller and faster manifest files :)