JanKaul opened a new pull request, #3567:
URL: https://github.com/apache/iceberg-rust/pull/3567
## Which issue does this PR close?
None. It is a one-line bug fix; happy to file an issue if you prefer one.
## What changes are included in this PR?
`BasicDeleteFileLoader::parquet_to_batch_stream` maps errors of the record
batch stream like this:
```rust
.map_err(|e| Error::new(ErrorKind::Unexpected, format!("{e}")))
```
The `ParquetError` is formatted into the message and dropped. When the read
failed in the `FileIO` (not found, permission denied, a throttled or timed-out
request), the storage error behind it is only text. A caller cannot reach it
through `Error::source()` to decide whether to retry.
The data file path already converts with `Error::from`, which keeps the
source. This PR does the same for delete files. The error now reads "Failed to
read a Parquet file", with the `ParquetError` as its source.
Opening the delete file and loading its metadata already kept their sources.
Only failures while streaming the pages were affected.
## Are these changes tested?
Yes. `test_stream_error_keeps_the_parquet_error_as_source` writes a
positional delete file, overwrites its first column chunk so the metadata still
loads, and reads it through `read_delete_file`. It asserts the error message
and that `source()` is a `ParquetError`. With the old `map_err` the test fails.
`cargo test -p iceberg --all-features --lib` passes and clippy is clean.
## AI Disclosure
The change, the test and this description were written with Claude Code
(Claude Opus 5.5) and reviewed by me.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]