feat(puffin): Add PuffinWriter#959
Merged
liurenjie1024 merged 2 commits intoapache:mainfrom Apr 1, 2025
Merged
Conversation
8 tasks
af396c4 to
d3749f4
Compare
Contributor
|
@fqaiser94 Whats the current idea for this? I can offer help if needed. |
Contributor
Author
Forgot about this, let me try to revive this over the weekend |
d3749f4 to
7252011
Compare
7252011 to
6111a90
Compare
Contributor
Author
There was a problem hiding this comment.
Pull Request Overview
This PR introduces the PuffinWriter for writing Iceberg Puffin files with a focus on thread safety via a mutex lock for file writes. Key changes include:
- Implementation of the PuffinWriter with header and footer handling.
- Integration of blob compression and metadata tracking.
- Addition of tests to validate behavior across various scenarios.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/iceberg/src/puffin/writer.rs | Introduces the new PuffinWriter and its API for writing blobs. |
| crates/iceberg/src/puffin/mod.rs | Registers the new writer module. |
Comments suppressed due to low confidence (1)
crates/iceberg/src/puffin/writer.rs:196
- [nitpick] The test asserts on an exact error message string when add is called after closing. Consider using a dedicated error type or variant in order to make error matching more robust and less brittle.
assert_eq!( writer.add(blob_0(), CompressionCodec::None).await.unwrap_err().to_string(),
Contributor
liurenjie1024
left a comment
There was a problem hiding this comment.
Thanks @fqaiser94 for this great pr, just some minor suggestions. Maybe we can remove the WriterState?
liurenjie1024
approved these changes
Apr 1, 2025
Contributor
liurenjie1024
left a comment
There was a problem hiding this comment.
Thanks @fqaiser94 for this great pr, LGTM!
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.
Part of #744
Summary
Context