tustvold commented on issue #5494:
URL: https://github.com/apache/arrow-rs/issues/5494#issuecomment-1987368256

   Ok so the issue here is that whilst #5109 added support for lists within 
make_builder, it did so by implementing `ArrayBuilder` for `Box<dyn 
ArrayBuilder>`.
   
   What this means is that `StructBuilder` actually creates a 
`ListBuilder<Box<dyn ArrayBuilder>>` instead of `ListBuilder<StructArray>`. 
   
   There are a couple of ways to solve this:
   
   * Use `struct_builder.field_builder::<ListBuilder<Box<dyn 
ArrayBuilder>>>(1usize).unwrap()`
   * Manually create the `ListBuilder<StructArray>` and use `StructBuilder::new`
   
   We should definitely better document this, I was not aware of this behaviour 
myself


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