pub struct SuperArrayV {
pub slices: Vec<ArrayV>,
pub len: usize,
pub field: Arc<Field>,
}Expand description
§SuperArrayView
Borrowed view over an arbitrary [offset .. offset+len) window of a ChunkedArray.
The window may span multiple internal chunks, presenting them as a unified logical view.
§Purpose
A mini-batch of one array (or one SuperArray entry). Handy when you’ve
cached null counts / stats over regions and want to operate on those regions
without materialising the whole column.
§Fields
slices: constituentArrayViewpieces spanning the window.len: total logical row count for this view.field: schema field associated with the array (shared).
§Notes
- Use
chunks/iterto walk chunk pieces, oriter_rowsto traverse row-by-row across chunks. - For hot paths, prefer contiguous (memory) windows; otherwise consider
consolidateto materialise a single buffer.
Fields§
§slices: Vec<ArrayV>§len: usize§field: Arc<Field>Implementations§
Source§impl SuperArrayV
impl SuperArrayV
pub fn is_empty(&self) -> bool
pub fn n_slices(&self) -> usize
Sourcepub fn slice(&self, offset: usize, len: usize) -> SuperArrayV
pub fn slice(&self, offset: usize, len: usize) -> SuperArrayV
Returns a sub-window of this chunked array view over [offset .. offset+len).
Produces a new ChunkedArrayView with updated slice metadata.
The field metadata is preserved as-is. Underlying data is not cloned.
Sourcepub fn get_value(&self, idx: usize) -> Array
pub fn get_value(&self, idx: usize) -> Array
Returns the 1-element Array value at the logical index.
Sourcepub fn iter(&self) -> impl Iterator<Item = ArrayV>
pub fn iter(&self) -> impl Iterator<Item = ArrayV>
Iterate over all ArraySlice’s in this slice.
Sourcepub fn iter_rows(&self) -> impl Iterator<Item = (&Array, usize, usize)>
pub fn iter_rows(&self) -> impl Iterator<Item = (&Array, usize, usize)>
Returns an iterator over all rows as 1-element ArrayViews.
Allows walking across potentially chunked memory logically row-by-row.
Trait Implementations§
Source§impl Clone for SuperArrayV
impl Clone for SuperArrayV
Source§fn clone(&self) -> SuperArrayV
fn clone(&self) -> SuperArrayV
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Concatenate for SuperArrayV
impl Concatenate for SuperArrayV
Source§fn concat(self, other: SuperArrayV) -> Result<SuperArrayV, MinarrowError>
fn concat(self, other: SuperArrayV) -> Result<SuperArrayV, MinarrowError>
Concatenates two super array views by materialising both to owned arrays, concatenating them, and wrapping the result back in a view.
§Notes
- This operation copies data from both views to create owned arrays.
- The resulting view contains a single slice wrapping the concatenated array.
- The field metadata from the first view is preserved.
Source§impl Consolidate for SuperArrayV
impl Consolidate for SuperArrayV
Source§fn consolidate(self) -> Array
fn consolidate(self) -> Array
Consolidates all view chunks into a single contiguous Array.
§Optimisations
- Single slice covering full array: returns cheap Arc clone (no copy).
- Multiple consecutive slices on same buffer covering full array: Arc clone.
- Otherwise: directly extends from source data slices (single copy per element).
Source§impl Debug for SuperArrayV
impl Debug for SuperArrayV
Source§impl From<SuperArray> for SuperArrayV
SuperArray -> SuperArrayV conversion
impl From<SuperArray> for SuperArrayV
SuperArray -> SuperArrayV conversion