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

Method take_iter_unchecked

arrow-array/src/array/primitive_array.rs:825–830  ·  view source on GitHub ↗

Returns an iterator that returns the values of `array.value(i)` for an iterator with each element `i` # Safety caller must ensure that the offsets in the iterator are less than the array len()

(
        &'a self,
        indexes: impl Iterator<Item = Option<usize>> + 'a,
    )

Source from the content-addressed store, hash-verified

823 ///
824 /// caller must ensure that the offsets in the iterator are less than the array len()
825 pub unsafe fn take_iter_unchecked<'a>(
826 &'a self,
827 indexes: impl Iterator<Item = Option<usize>> + 'a,
828 ) -> impl Iterator<Item = Option<T::Native>> + 'a {
829 indexes.map(|opt_index| opt_index.map(|index| unsafe { self.value_unchecked(index) }))
830 }
831
832 /// Returns a zero-copy slice of this array with the indicated offset and length.
833 pub fn slice(&self, offset: usize, length: usize) -> Self {

Callers

nothing calls this directly

Calls 1

value_uncheckedMethod · 0.45

Tested by

no test coverage detected