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) -> Self

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 = ArrayVT<'_>> + '_

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 Add for SuperArrayV

Available on crate features chunked and views only.
Source§

type Output = Result<SuperArray, MinarrowError>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl ByteSize for SuperArrayV

Available on crate features chunked and views only.

ByteSize for SuperArrayV - sum of slice estimates

Source§

fn est_bytes(&self) -> usize

Returns the estimated byte size of this object in memory. Read more
Source§

impl Clone for SuperArrayV

Source§

fn clone(&self) -> SuperArrayV

Returns a duplicate of the value. Read more
1.0.0 · 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: Self) -> Result<Self, 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

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

impl Div for SuperArrayV

Available on crate features chunked and views only.
Source§

type Output = Result<SuperArray, MinarrowError>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl From<SuperArray> for SuperArrayV

SuperArray -> SuperArrayV conversion

Source§

fn from(super_array: SuperArray) -> Self

Converts to this type from the input type.
Source§

impl From<SuperArrayV> for Value

Available on crate features chunked and views only.
Source§

fn from(v: SuperArrayV) -> Self

Converts to this type from the input type.
Source§

impl Mul for SuperArrayV

Available on crate features chunked and views only.
Source§

type Output = Result<SuperArray, MinarrowError>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl PartialEq for SuperArrayV

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Rem for SuperArrayV

Available on crate features chunked and views only.
Source§

type Output = Result<SuperArray, MinarrowError>

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. 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 Sub for SuperArrayV

Available on crate features chunked and views only.
Source§

type Output = Result<SuperArray, MinarrowError>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl TryFrom<Value> for SuperArrayV

Available on crate features chunked and views only.
Source§

type Error = MinarrowError

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

fn try_from(v: Value) -> Result<Self, Self::Error>

Performs the conversion.
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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

fn align() -> usize

The alignment necessary for the key. Must return a power of two.
Source§

fn size(&self) -> usize

The size of the key in bytes.
Source§

unsafe fn init(&self, ptr: *mut u8)

Initialize the key in the given memory location. Read more
Source§

unsafe fn get<'a>(ptr: *const u8) -> &'a T

Get a reference to the key from the given memory location. Read more
Source§

unsafe fn drop_in_place(ptr: *mut u8)

Drop the key in place. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T