alamb commented on a change in pull request #845:
URL: https://github.com/apache/arrow-rs/pull/845#discussion_r734408138
##########
File path: arrow/src/ipc/reader.rs
##########
@@ -347,18 +347,7 @@ fn create_list_array(
buffers: &[Buffer],
child_array: ArrayRef,
) -> ArrayRef {
- if let DataType::List(_) = *data_type {
- let null_count = field_node.null_count() as usize;
- let mut builder = ArrayData::builder(data_type.clone())
- .len(field_node.length() as usize)
- .buffers(buffers[1..2].to_vec())
- .offset(0)
- .child_data(vec![child_array.data().clone()]);
- if null_count > 0 {
- builder = builder.null_bit_buffer(buffers[0].clone())
- }
- make_array(unsafe { builder.build_unchecked() })
- } else if let DataType::LargeList(_) = *data_type {
+ if let DataType::List(_) | DataType::LargeList(_) = *data_type {
Review comment:
Nice
--
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]