geruh opened a new pull request, #2998:
URL: https://github.com/apache/iceberg-python/pull/2998

   # Rationale for this change
   
   Currently, PyIceberg writes one manifest per snapshot operation regardless 
of manifest size. In order to eventually support this we need to be able to 
track written bytes without closing the file, so that we can roll to a new file 
once we hit target size. 
   
   We had some of this work done in #650, but we can keep this simple and add 
writers as a follow up. The nice thing is that the underlying streams we 
support already have a tell() method and we just need to expose it. 
   
   With this change in the follow up we can do:
   
   ```
   with write_manifest(...) as writer:
       writer.add_entry(entry)
       if writer.tell() >= target_file_size:
           # roll to new file
   ```
   
   ## Are these changes tested?
   
   Yes, added a test :)
   
   ## Are there any user-facing changes?
   
   No
   


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