`take` implementation for byte view arrays
(
array: &GenericByteViewArray<T>,
indices: &PrimitiveArray<IndexType>,
)
| 623 | |
| 624 | /// `take` implementation for byte view arrays |
| 625 | fn 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 | /// |
nothing calls this directly
no test coverage detected