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

Function take_byte_view

arrow-select/src/take.rs:625–635  ·  view source on GitHub ↗

`take` implementation for byte view arrays

(
    array: &GenericByteViewArray<T>,
    indices: &PrimitiveArray<IndexType>,
)

Source from the content-addressed store, hash-verified

623
624/// `take` implementation for byte view arrays
625fn take_byte_view<T: ByteViewType, IndexType: ArrowPrimitiveType>(
626 array: &GenericByteViewArray<T>,
627 indices: &PrimitiveArray<IndexType>,
628) -> Result<GenericByteViewArray<T>, ArrowError> {
629 let new_views = take_native(array.views(), indices);
630 let new_nulls = take_nulls(array.nulls(), indices);
631 // Safety: array.views was valid, and take_native copies only valid values, and verifies bounds
632 Ok(unsafe {
633 GenericByteViewArray::new_unchecked(new_views, array.data_buffers().to_vec(), new_nulls)
634 })
635}
636
637/// `take` implementation for list arrays
638///

Callers

nothing calls this directly

Calls 5

take_nativeFunction · 0.85
take_nullsFunction · 0.85
viewsMethod · 0.80
data_buffersMethod · 0.80
nullsMethod · 0.45

Tested by

no test coverage detected