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

Method slice

arrow-array/src/array/list_view_array.rs:384–392  ·  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

382
383 /// Returns a zero-copy slice of this array with the indicated offset and length.
384 pub fn slice(&self, offset: usize, length: usize) -> Self {
385 Self {
386 data_type: self.data_type.clone(),
387 nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)),
388 values: self.values.clone(),
389 value_offsets: self.value_offsets.slice(offset, length),
390 value_sizes: self.value_sizes.slice(offset, length),
391 }
392 }
393
394 /// Creates a [`GenericListViewArray`] from an iterator of primitive values
395 /// # Example

Callers 5

value_uncheckedMethod · 0.45
valueMethod · 0.45

Calls 2

cloneMethod · 0.45
as_refMethod · 0.45

Tested by 3