ranflarion opened a new pull request, #10564:
URL: https://github.com/apache/arrow-rs/pull/10564

   # Which issue does this PR close?
   
   Closes #10563.
   
   # Rationale for this change
   
   A short read pushed into the parquet push decoder panics at 
`PushBuffers::push_range` ("Range length must match buffer length") although 
every public entry point that feeds it returns `Result`. Through the async 
reader this turns a transient store fault into a reader-thread panic the caller 
cannot classify or retry; the json and avro readers surface the equivalent 
fault as a decode error.
   
   # What changes are included in this PR?
   
   `PushBuffers::push_range` and `push_ranges` return `Result<(), 
ParquetError>` instead of asserting (buffer/range length mismatch, and 
ranges/buffers count mismatch in `push_ranges`). The error propagates through 
the crate-internal chain: 
`ParquetMetaDataPushDecoder::push_range`/`push_ranges` (already `Result`, now 
use `?`), and `ParquetDecoderState::push_data` -> 
`RemainingRowGroups::push_data` -> `RowGroupReaderBuilder::push_data`, the last 
two becoming fallible; all their callers were already in `Result` contexts.
   
   # Are these changes tested?
   
   New unit tests in `push_buffers.rs` cover the accepted case, the 
short-buffer error, and the count-mismatch error. The existing parquet test 
suite passes.
   
   # Are there any user-facing changes?
   
   No stable API change: the public decoder entry points keep their `Result` 
signatures. `PushBuffers` (exported only under the `experimental` feature, 
which carries no stability guarantees) changes `push_range`/`push_ranges` from 
`fn(...)` to `fn(...) -> Result<(), ParquetError>`. Code that previously 
panicked on mismatched pushes now receives an `Err`.
   


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

Reply via email to