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

Method bytes_iter

arrow-array/src/array/byte_view_array.rs:370–382  ·  view source on GitHub ↗

Returns an iterator over the bytes of this array, including null values

(&self)

Source from the content-addressed store, hash-verified

368
369 /// Returns an iterator over the bytes of this array, including null values
370 pub fn bytes_iter(&self) -> impl Iterator<Item = &[u8]> {
371 self.views.iter().map(move |v| {
372 let len = *v as u32;
373 if len <= MAX_INLINE_VIEW_LEN {
374 unsafe { Self::inline_value(v, len as usize) }
375 } else {
376 let view = ByteView::from(*v);
377 let data = &self.buffers[view.buffer_index as usize];
378 let offset = view.offset as usize;
379 unsafe { data.get_unchecked(offset..offset + len as usize) }
380 }
381 })
382 }
383
384 /// Returns an iterator over the first `prefix_len` bytes of each array
385 /// element, including null values.

Callers

nothing calls this directly

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected