jorgecarleitao opened a new pull request #9388:
URL: https://github.com/apache/arrow/pull/9388


   This PR enables creating a `ListArray` of primitive types out of a an 
iterator of options, as follows:
   
   ```rust
   use arrow::array::ListArray;
   use arrow::datatypes::Int32Type;
   let data = vec![
       Some(vec![Some(0), Some(1), Some(2)]),
       None,
       Some(vec![Some(3), None, Some(5)]),
       Some(vec![Some(6), Some(7)]),
   ];
   let list_array = ListArray::from_iter_primitive::<Int32Type, _, _>(data);
   println!("{:?}", list_array);
   ```
   
   which simplifies some code around building these, as well enabling kernels 
that operate on `ListArrays` (which are currently a bit painful to write).
   
   Note that this is built on top of #9370 , as this requires the 
`PrimitiveArray::from_iter` to be growable. We can wait for that to be reviewed.


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

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


Reply via email to