ebyhr commented on code in PR #3478:
URL: https://github.com/apache/iceberg-python/pull/3478#discussion_r3400813433


##########
pyiceberg/io/pyarrow.py:
##########
@@ -1139,6 +1162,22 @@ def _read_deletes(io: FileIO, data_file: DataFile) -> 
dict[str, pa.ChunkedArray]
             }
     elif data_file.file_format == FileFormat.PUFFIN:
         with io.new_input(data_file.file_path).open() as fi:
+            content_offset = getattr(data_file, "content_offset", None)
+            content_size_in_bytes = getattr(data_file, 
"content_size_in_bytes", None)
+            if content_offset is not None or content_size_in_bytes is not None:

Review Comment:
   These two fields are never None when the file format is Puffin, right? 
   
   https://iceberg.apache.org/spec/#data-file-fields
   ```
   The content_offset and content_size_in_bytes fields are used to reference a 
specific blob for direct access to a deletion vector.
   For deletion vectors, these values are required and must exactly match the 
offset and length stored in the Puffin footer for the deletion vector blob.
   ```



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