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

Method value_offset

arrow-array/src/array/union_array.rs:281–287  ·  view source on GitHub ↗

Returns the offset into the underlying values array for the array slot at `index`. # Panics Panics if `index` is greater than or equal the length of the array.

(&self, index: usize)

Source from the content-addressed store, hash-verified

279 ///
280 /// Panics if `index` is greater than or equal the length of the array.
281 pub fn value_offset(&self, index: usize) -> usize {
282 assert!(index < self.len());
283 match &self.offsets {
284 Some(offsets) => offsets[index] as usize,
285 None => self.offset() + index,
286 }
287 }
288
289 /// Returns the array's value at index `i`.
290 ///

Callers 6

encodeMethod · 0.45
writeMethod · 0.45
append_rowMethod · 0.45
valueMethod · 0.45

Calls 1

offsetMethod · 0.45

Tested by

no test coverage detected