jp0317 commented on issue #5332:
URL: https://github.com/apache/arrow-rs/issues/5332#issuecomment-2460195372

    > not panicking for a bunch of seemingly random kernel computations (esp. 
in the DataFusion context) is hard to avoid,
    
   i agree that it's tricky to fully eliminate panics, though fuzz can help 
reduce panics. IMHO the current codes include many unnecessary panics: e.g., 
overflow panics due to not using checked operation (such as 
[shift](https://github.com/apache/arrow-rs/blob/master/parquet/src/thrift.rs#L70),
 
[add](https://github.com/apache/arrow-rs/blob/master/parquet/src/thrift.rs#L150),
 etc.), explicit panics from 
[unimplemented!()](https://github.com/apache/arrow-rs/blob/master/parquet/src/thrift.rs#L101),
 
[assert!()](https://github.com/apache/arrow-rs/blob/master/parquet/src/schema/types.rs#L974),
 
[panic!()](https://github.com/apache/arrow-rs/blob/master/parquet/src/basic.rs#L924).
 
   
   It seems we can either replace those with proper errors, or maybe just add 
some sanity checks while keeping the panic codes, e.g., for the [bit_width 
panic](https://github.com/apache/arrow-rs/blob/master/parquet/src/basic.rs#L924)
 we can reject invalid bit_width earlier 
[here](https://github.com/apache/arrow-rs/blob/master/parquet/src/format.rs#L1737-L1741)
 such that the panic codes would never get executed)


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to