(value: GenericListArray<OffsetSize>)
| 554 | for GenericListViewArray<OffsetSize> |
| 555 | { |
| 556 | fn from(value: GenericListArray<OffsetSize>) -> Self { |
| 557 | let (field, offsets, values, nulls) = value.into_parts(); |
| 558 | let len = offsets.len() - 1; |
| 559 | let mut sizes = Vec::with_capacity(len); |
| 560 | let mut view_offsets = Vec::with_capacity(len); |
| 561 | for (i, offset) in offsets.iter().enumerate().take(len) { |
| 562 | view_offsets.push(*offset); |
| 563 | sizes.push(offsets[i + 1] - offsets[i]); |
| 564 | } |
| 565 | |
| 566 | Self::new( |
| 567 | field, |
| 568 | ScalarBuffer::from(view_offsets), |
| 569 | ScalarBuffer::from(sizes), |
| 570 | values, |
| 571 | nulls, |
| 572 | ) |
| 573 | } |
| 574 | } |
| 575 | |
| 576 | impl<OffsetSize: OffsetSizeTrait> From<GenericListViewArray<OffsetSize>> for ArrayData { |
nothing calls this directly
no test coverage detected