Skip to main content

SuperArrayV

Struct SuperArrayV 

Source
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: constituent ArrayView pieces spanning the window.
  • len: total logical row count for this view.
  • field: schema field associated with the array (shared).

§Notes

  • Use chunks / iter to walk chunk pieces, or iter_rows to traverse row-by-row across chunks.
  • For hot paths, prefer contiguous (memory) windows; otherwise consider consolidate to materialise a single buffer.

Fields§

§slices: Vec<ArrayV>§len: usize§field: Arc<Field>

Implementations§

Source§

impl SuperArrayV

Source

pub fn is_empty(&self) -> bool

Source

pub fn n_slices(&self) -> usize

Source

pub fn chunks(&self) -> impl Iterator<Item = &ArrayV>

Iterator over the underlying ArraySlices

Source

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.

Source

pub fn get_value(&self, idx: usize) -> Array

Returns the 1-element Array value at the logical index.

Source

pub fn iter(&self) -> impl Iterator<Item = ArrayV>

Iterate over all ArraySlice’s in this slice.

Source

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.

Source

pub fn row_slice(&self, row: usize) -> ArrayV

Returns a zero-copy 1-row ArrayWindow at the given logical row index.

Source

pub fn len(&self) -> usize

Returns the total number of elements in the array

Trait Implementations§

Source§

impl Clone for SuperArrayV

Source§

fn clone(&self) -> SuperArrayV

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Concatenate for SuperArrayV

Source§

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

Source§

fn consolidate(self) -> Array

Consolidates all view chunks into a single contiguous Array.

§Optimisations
  1. Single slice covering full array: returns cheap Arc clone (no copy).
  2. Multiple consecutive slices on same buffer covering full array: Arc clone.
  3. Otherwise: directly extends from source data slices (single copy per element).
Source§

type Output = Array

The type produced after consolidation.
Source§

impl Debug for SuperArrayV

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<SuperArray> for SuperArrayV

SuperArray -> SuperArrayV conversion

Source§

fn from(super_array: SuperArray) -> SuperArrayV

Converts to this type from the input type.
Source§

impl PartialEq for SuperArrayV

Source§

fn eq(&self, other: &SuperArrayV) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Shape for SuperArrayV

Source§

fn shape(&self) -> ShapeDim

Returns arbitrary Shape dimension for any data shape
Source§

fn shape_1d(&self) -> usize

Returns the first dimension shape Read more
Source§

fn shape_2d(&self) -> (usize, usize)

Returns the first and second dimension shapes Read more
Source§

fn shape_3d(&self) -> (usize, usize, usize)

Returns the first, second and third dimension shapes Read more
Source§

fn shape_4d(&self) -> (usize, usize, usize, usize)

Returns the first, second, third and fourth dimension shapes Read more
Source§

impl StructuralPartialEq for SuperArrayV

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CustomValue for T
where T: Any + Send + Sync + Clone + PartialEq + Debug,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Downcasts the type as Any
Source§

fn deep_clone(&self) -> Arc<dyn CustomValue>

Returns a deep clone of the object. Read more
Source§

fn eq_box(&self, other: &(dyn CustomValue + 'static)) -> bool

Performs semantic equality on the boxed object. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.