ebyhr commented on code in PR #3474:
URL: https://github.com/apache/iceberg-python/pull/3474#discussion_r3385471306
##########
pyiceberg/table/puffin.py:
##########
@@ -114,3 +151,92 @@ def __init__(self, puffin: bytes) -> None:
def to_vector(self) -> dict[str, "pa.ChunkedArray"]:
return {path: _bitmaps_to_chunked_array(bitmaps) for path, bitmaps in
self._deletion_vectors.items()}
+
+
+class PuffinWriter:
+ """Writes a Puffin file containing a single deletion-vector-v1 blob."""
Review Comment:
This comment looks misleading. This writer doesn't write a file in my
understanding.
##########
pyiceberg/table/puffin.py:
##########
@@ -114,3 +151,92 @@ def __init__(self, puffin: bytes) -> None:
def to_vector(self) -> dict[str, "pa.ChunkedArray"]:
return {path: _bitmaps_to_chunked_array(bitmaps) for path, bitmaps in
self._deletion_vectors.items()}
+
+
+class PuffinWriter:
+ """Writes a Puffin file containing a single deletion-vector-v1 blob."""
+
+ _blobs: list[PuffinBlobMetadata]
+ _blob_payloads: list[bytes]
+ _created_by: str
+
+ def __init__(self, created_by: str | None = None) -> None:
Review Comment:
What about accepting an OutputFile or something, and writing the content to
it? I think this is a better approach than returning bytes. Iceberg Java
PuffinWriter also accepts an output file object.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]