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

Method value_unchecked

arrow-array/src/array/dictionary_array.rs:959–969  ·  view source on GitHub ↗
(&self, index: usize)

Source from the content-addressed store, hash-verified

957 }
958
959 unsafe fn value_unchecked(&self, index: usize) -> Self::Item {
960 let val = unsafe { self.dictionary.keys.value_unchecked(index) };
961 let value_idx = val.as_usize();
962
963 // As dictionary keys are only verified for non-null indexes
964 // we must check the value is within bounds
965 match value_idx < self.values.len() {
966 true => unsafe { self.values.value_unchecked(value_idx) },
967 false => Default::default(),
968 }
969 }
970}
971
972/// A [`DictionaryArray`] with the key type erased

Callers 1

valueMethod · 0.45

Calls 3

defaultFunction · 0.85
as_usizeMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected