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

Method value

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

Returns the array's value at index `i`. Note: This method does not check for nulls and the value is arbitrary (but still well-defined) if [`is_null`](Self::is_null) returns true for the index. # Panics Panics if index `i` is out of bounds

(&self, i: usize)

Source from the content-addressed store, hash-verified

294 /// # Panics
295 /// Panics if index `i` is out of bounds
296 pub fn value(&self, i: usize) -> ArrayRef {
297 let type_id = self.type_id(i);
298 let value_offset = self.value_offset(i);
299 let child = self.child(type_id);
300 child.slice(value_offset, 1)
301 }
302
303 /// Returns the names of the types in the union.
304 pub fn type_names(&self) -> Vec<&str> {

Callers 12

test_dense_i32Function · 0.45
test_dense_i32_largeFunction · 0.45
test_dense_mixedFunction · 0.45
test_sparse_i32Function · 0.45
test_sparse_mixedFunction · 0.45
test_slice_unionFunction · 0.45
test_custom_type_idsFunction · 0.45

Calls 4

type_idMethod · 0.80
value_offsetMethod · 0.45
childMethod · 0.45
sliceMethod · 0.45

Tested by 12

test_dense_i32Function · 0.36
test_dense_i32_largeFunction · 0.36
test_dense_mixedFunction · 0.36
test_sparse_i32Function · 0.36
test_sparse_mixedFunction · 0.36
test_slice_unionFunction · 0.36
test_custom_type_idsFunction · 0.36