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

Method value_unchecked

arrow-array/src/array/list_array.rs:338–342  ·  view source on GitHub ↗

Returns ith value of this list array. Note: This method does not check for nulls and the value is arbitrary if [`is_null`](Self::is_null) returns true for the index. # Safety Caller must ensure that the index is within the array bounds

(&self, i: usize)

Source from the content-addressed store, hash-verified

336 /// # Safety
337 /// Caller must ensure that the index is within the array bounds
338 pub unsafe fn value_unchecked(&self, i: usize) -> ArrayRef {
339 let end = unsafe { self.value_offsets().get_unchecked(i + 1).as_usize() };
340 let start = unsafe { self.value_offsets().get_unchecked(i).as_usize() };
341 self.values.slice(start, end - start)
342 }
343
344 /// Returns ith value of this list array.
345 ///

Callers

nothing calls this directly

Calls 3

as_usizeMethod · 0.80
value_offsetsMethod · 0.45
sliceMethod · 0.45

Tested by

no test coverage detected