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

   # Which issue does this PR close?
   
   Closes #12129
   
   # Rationale
   
   `ColumnValueDecoderImpl::set_data` calls `.expect("Decoder for dict should 
have been set")` when a `RLE_DICTIONARY`-encoded data page arrives without a 
preceding dictionary page. A malformed or truncated file triggers a panic, 
crashing the process.
   
   The byte-array readers at `arrow/array_reader/byte_array.rs:306,325` already 
handle this case with `ok_or_else(|| general_err!("missing dictionary page for 
column"))`.
   
   # What changes are included in this PR?
   
   Replace the `.expect()` with `.ok_or_else()` returning the same error 
message the byte-array readers use. One line changed.
   
   # Are there any user-facing changes?
   
   Malformed Parquet files with missing dictionary pages now return `Err` 
instead of panicking. This improves safety for applications reading untrusted 
files.


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