MCPcopy Create free account
hub / github.com/apache/arrow-rs / from

Method from

arrow-array/src/array/list_view_array.rs:556–573  ·  view source on GitHub ↗
(value: GenericListArray<OffsetSize>)

Source from the content-addressed store, hash-verified

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
576impl<OffsetSize: OffsetSizeTrait> From<GenericListViewArray<OffsetSize>> for ArrayData {

Callers

nothing calls this directly

Calls 14

child_dataMethod · 0.80
into_partsMethod · 0.45
lenMethod · 0.45
takeMethod · 0.45
iterMethod · 0.45
pushMethod · 0.45
buffersMethod · 0.45
nullsMethod · 0.45
build_uncheckedMethod · 0.45
data_typeMethod · 0.45
size_hintMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected