jonahgao opened a new issue, #5642:
URL: https://github.com/apache/arrow-rs/issues/5642

   **Describe the bug**
   thread 'main' panicked at arrow-data-51.0.0/src/transform/mod.rs:66:14:
   MutableArrayData not nullable
   
   **To Reproduce**
   When the `safe` option is false and the source array contains a null list.
   ```rust
   use arrow::array::{ArrayRef, ListArray};
   use arrow::compute::{cast_with_options, CastOptions};
   use arrow::datatypes::{DataType, Field, Int32Type};
   use std::sync::Arc;
   
   fn main() {
       let list =
           ListArray::from_iter_primitive::<Int32Type, _, 
_>(vec![Some(vec![Some(1), Some(2)]), None]);
       let array = Arc::new(list.clone()) as ArrayRef;
       let field = Arc::new(Field::new("item", DataType::Int32, true));
       let options = CastOptions {
           safe: false,
           ..Default::default()
       };
       cast_with_options(
           array.as_ref(),
           &DataType::FixedSizeList(field.clone(), 2),
           &options,
       )
       .unwrap();
   }
   
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   **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