xgbtxy commented on PR #3773:
URL: https://github.com/apache/iceberg-rust/pull/3773#issuecomment-7398768136

   Thanks for the thoughtful review, @xanderbailey! Addressed all three points 
in the latest commit:
   
   1. **Removed the `offset < 4` header-magic check**: Since reading bytes 
`0..4` within `file_length` cannot overflow or over-allocate, removing this 
check aligns `PuffinReader::blob` with Java's `PuffinReader.readAll` while 
keeping the `checked_add` overflow and `end > file_length` bounds checks.
   2. **Exact `assert_eq!(err.message(), ...)` assertions**: Replaced substring 
`contains(...)` checks with exact full-message assertions in the overflow and 
out-of-bounds tests.
   3. **File-length boundary test**: Added 
`test_blob_range_at_file_length_boundary` verifying a blob ending exactly at 
`file_length` succeeds and one ending 1 byte past `file_length` fails with 
`ErrorKind::DataInvalid` (`cargo test -p iceberg puffin`: 43 passed, 0 failed).


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