moomindani commented on code in PR #3474:
URL: https://github.com/apache/iceberg-python/pull/3474#discussion_r3475198376


##########
pyiceberg/table/puffin.py:
##########
@@ -114,3 +152,99 @@ 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:

Review Comment:
   Following up here: after the discussion in #3491 we decided to keep 
`PuffinWriter` as a generic, format-level writer and put the DV serialization 
on `DeletionVector` (`to_blob()`), rather than renaming. I've reworked this PR 
onto #3491 accordingly — details in the summary comment above.



##########
pyiceberg/table/puffin.py:
##########
@@ -114,3 +152,99 @@ 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 to an 
output file."""
+
+    _output_file: OutputFile
+    _blobs: list[PuffinBlobMetadata]
+    _blob_payloads: list[bytes]
+    _created_by: str
+
+    def __init__(self, output_file: OutputFile, created_by: str | None = None) 
-> None:
+        self._output_file = output_file
+        self._blobs = []
+        self._blob_payloads = []
+        self._created_by = (
+            created_by if created_by is not None else f"PyIceberg version 
{importlib.metadata.version('pyiceberg')}"

Review Comment:
   Still in place after the rework onto #3491 — `created-by` defaults to 
`PyIceberg version {__version__}` via `from pyiceberg import __version__`.



-- 
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]

Reply via email to