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

   ## Summary
   
   Fix `FsspecInputFile.__len__` and `FsspecOutputFile.__len__` so zero-byte 
files return `0` instead of being treated as missing metadata.
   
   Both methods previously used truthiness checks on `object_info.get(...)`, 
which caused valid sizes like `0` to fall through to the runtime error path.
   
   ## Changes
   
   - check for `Size` key presence explicitly
   - check for `size` key presence explicitly
   - add a regression test covering zero-byte lengths for both metadata key 
variants
   
   ## Verification
   
   - `python -m pytest tests/io/test_fsspec.py -k zero_length_of_file -q`


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