helgikrs opened a new issue #1193:
URL: https://github.com/apache/arrow-rs/issues/1193


   **Describe the bug**
   Pretty printing a record batch containing a float16 column produces an error
   ```console
   panicked at 'called `Option::unwrap()` on a `None` value', 
arrow/src/util/display.rs:316:30
   ```
   
   **To Reproduce**
   
   Create a record batch containing a float16 array and call 
`pretty_format_batches` on it, like so:
   
   ```rust
   let values = vec![
       Some(f16::from_f32(f32::NAN)),
       Some(f16::from_f32(4.0)),
       Some(f16::from_f32(f32::NEG_INFINITY)),
   ];
   let array = Arc::new(values.into_iter().collect::<Float16Array>()) as 
ArrayRef;
   
   let schema = Arc::new(Schema::new(vec![Field::new(
       "f16",
       array.data_type().clone(),
       true,
   )]));
   
   let batch = RecordBatch::try_new(schema, vec![array])?;
   
   let table = pretty_format_batches(&[batch])?.to_string();
   ```
   
   **Expected behavior**
   Should pretty print the record batch.
   
   **Additional context**
   Add any other context about the problem here.
   


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