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

Method slice

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

Returns a zero-copy slice of this array with the indicated offset and length.

(&self, offset: usize, length: usize)

Source from the content-addressed store, hash-verified

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 {
834 Self {
835 data_type: self.data_type.clone(),
836 values: self.values.slice(offset, length),
837 nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)),
838 }
839 }
840
841 /// Reinterprets this array's contents as a different data type without copying
842 ///

Callers 3

test_boolean_array_sliceFunction · 0.45

Calls 2

cloneMethod · 0.45
as_refMethod · 0.45

Tested by 3

test_boolean_array_sliceFunction · 0.36