MCPcopy Create free account
hub / github.com/apache/datafusion / offsets

Method offsets

datafusion/functions-nested/src/array_has.rs:302–315  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

300 }
301
302 fn offsets(&self) -> Box<dyn Iterator<Item = usize> + 'a> {
303 match self {
304 ArrayWrapper::FixedSizeList(arr) => {
305 let value_length = arr.value_length() as usize;
306 Box::new((0..=arr.len()).map(move |i| i * value_length))
307 }
308 ArrayWrapper::List(arr) => {
309 Box::new(arr.offsets().iter().map(|o| (*o) as usize))
310 }
311 ArrayWrapper::LargeList(arr) => {
312 Box::new(arr.offsets().iter().map(|o| (*o) as usize))
313 }
314 }
315 }
316
317 fn nulls(&self) -> Option<&NullBuffer> {
318 match self {

Callers 15

criterion_benchmarkFunction · 0.80
general_replaceFunction · 0.80
array_position_scalarFunction · 0.80
array_positions_scalarFunction · 0.80
map_values_innerFunction · 0.80
compact_listFunction · 0.80
general_removeFunction · 0.80
primitive_array_min_maxFunction · 0.80

Calls 4

newFunction · 0.85
mapMethod · 0.45
lenMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected