Skip to main content

Plan

Struct Plan 

Source
pub struct Plan<V: PlanVTable> { /* private fields */ }
Expand description

A typed, shared handle to a plan operator.

Implementations§

Source§

impl Plan<Synthetic>

Source

pub fn new( dtype: DType, row_count: u64, children: Vec<PlanRef>, builder: impl Fn(Range<u64>, &Mask, &mut Compiler<'_>) -> VortexResult<Option<Chain>> + Send + Sync + 'static, ) -> Self

A plan of row_count rows of dtype, with children, compiled by builder.

Source§

impl Plan<Concat>

Source

pub unsafe fn from_slots_unchecked( dtype: DType, row_count: u64, row_offsets: Arc<[u64]>, slots: PlanSlots, ) -> Self

Creates a concatenation from potentially unbuilt slots, one per chunk, without validation.

§Safety

Every slot must be present with dtype; row_offsets must contain the cumulative row offset of every chunk; and the sum of all chunk row counts must equal row_count without overflow.

Source

pub fn try_new(dtype: DType, children: Vec<PlanRef>) -> VortexResult<Self>

Creates a concatenation over children.

Every child must produce dtype, and the row domain is the sum of the child row counts.

Source

pub fn row_offsets(&self) -> &[u64]

Returns the first row of each child within this plan’s row domain.

Source§

impl Plan<Eval>

Source

pub fn try_new( expression: BoundExpression, child: PlanRef, ) -> VortexResult<Self>

Creates an evaluation of expression, which must be bound to the child’s dtype.

Source

pub unsafe fn new_unchecked(expression: BoundExpression, child: PlanRef) -> Self

Creates an evaluation without validating the expression’s root dtype.

§Safety

Every scope root in expression must have the same dtype as child.

Source

pub fn expression(&self) -> &BoundExpression

Returns the expression evaluated by this plan.

Source

pub fn child_plan(&self) -> VortexResult<PlanRef>

Returns the child plan supplying the expression root.

Source§

impl Plan<Filter>

Source

pub fn new(child: PlanRef) -> Self

Creates a filter over child.

Source

pub fn child_plan(&self) -> VortexResult<PlanRef>

Returns the plan whose rows are filtered.

Source§

impl Plan<ListPack>

Source

pub unsafe fn from_slots_unchecked( dtype: DType, row_count: u64, slots: PlanSlots, ) -> Self

Creates a list assembly from potentially unbuilt slots without validation.

§Safety

slots must be [elements, offsets, validity]. dtype must be a list whose element dtype matches the elements child. The offsets child must be a non-nullable integer with row_count + 1 rows. A non-nullable boolean validity child with row_count rows must be present exactly when dtype is nullable.

Source

pub fn try_new( nullability: Nullability, row_count: u64, elements: PlanRef, offsets: PlanRef, validity: Option<PlanRef>, ) -> VortexResult<Self>

Creates a list assembly from elements and offsets.

validity is required exactly when nullability is Nullability::Nullable. The row domain is one fewer than the number of offsets.

Source

pub fn elements(&self) -> VortexResult<PlanRef>

Returns the plan producing list elements.

Source

pub fn offsets(&self) -> VortexResult<PlanRef>

Returns the plan producing list offsets.

Source

pub fn validity(&self) -> VortexResult<Option<PlanRef>>

Returns the plan producing list validity, if the list is nullable.

Source§

impl Plan<Pack>

Source

pub unsafe fn from_slots_unchecked( fields: StructFields, nullability: Nullability, row_count: u64, slots: PlanSlots, ) -> Self

Creates a struct assembly from potentially unbuilt slots without validation.

§Safety

slots must hold a validity slot followed by one slot per field. The validity slot must be present exactly when nullability is nullable and produce non-nullable booleans. Every field slot must be present with its field dtype, and every child must have row_count rows.

Source

pub fn try_new( fields: StructFields, nullability: Nullability, row_count: u64, field_plans: Vec<PlanRef>, validity: Option<PlanRef>, ) -> VortexResult<Self>

Creates a struct assembly from fields and one child per field.

Each field child must have the corresponding field dtype and row_count rows. validity is required exactly when nullability is Nullability::Nullable and must produce non-nullable booleans with row_count rows.

Source

pub unsafe fn new_unchecked( fields: StructFields, nullability: Nullability, row_count: u64, field_plans: Vec<PlanRef>, validity: Option<PlanRef>, ) -> Self

Creates a struct assembly without validating its children.

§Safety

The caller must ensure that:

  • field_plans contains exactly one child per field, in field order;
  • every field child has the corresponding field dtype and row_count rows; and
  • validity is present exactly when the struct is nullable and, when present, produces non-nullable booleans with row_count rows.
Source

pub fn fields(&self) -> &StructFields

Returns the struct fields assembled by this plan.

Source

pub fn nfields(&self) -> usize

Returns the number of struct fields, excluding any validity child.

Source

pub fn validity(&self) -> VortexResult<Option<PlanRef>>

Returns the plan producing struct validity, if the struct is nullable.

Source

pub fn field(&self, index: usize) -> VortexResult<PlanRef>

Returns the plan producing field index.

Source§

impl Plan<RowIdx>

Source

pub fn new(row_count: u64) -> Self

Creates a row-index source covering row_count rows.

Source§

impl Plan<Share>

Source

pub fn new(child: PlanRef) -> Self

Creates a share of child.

Source

pub fn child_plan(&self) -> VortexResult<PlanRef>

Returns the shared plan.

Source§

impl Plan<Take>

Source

pub unsafe fn from_slots_unchecked( dtype: DType, row_count: u64, slots: PlanSlots, ) -> Self

Creates a take from potentially unbuilt slots without validation.

§Safety

slots must be [codes, values], both present; codes must have row_count rows; and dtype must be the values dtype unioned with the codes nullability.

Source

pub fn new(codes: PlanRef, values: PlanRef) -> Self

Creates a take of values at codes.

The row domain is that of codes, and the output dtype is that of values.

Source

pub fn codes(&self) -> VortexResult<PlanRef>

Returns the plan producing indices.

Source

pub fn values(&self) -> VortexResult<PlanRef>

Returns the plan producing the values being indexed.

Source§

impl Plan<Zoned>

Source

pub fn from_slots( dtype: DType, row_count: u64, slots: PlanSlots, zone_len: u64, aggregate_fns: Arc<[AggregateFnRef]>, ) -> Self

Pairs data and statistics slots with their zone length and aggregate functions.

Source

pub fn new( data: PlanRef, zones: PlanRef, zone_len: u64, aggregate_fns: Arc<[AggregateFnRef]>, ) -> Self

Creates a zoned plan over data summarised by zones of zone_len rows each, whose fields hold the results of aggregate_fns.

Source

pub fn zone_len(&self) -> u64

Returns the number of rows each zone summarises.

Source

pub fn aggregate_fns(&self) -> &Arc<[AggregateFnRef]> ⓘ

Returns the aggregate functions whose results the zone table stores.

Source

pub fn pruning_column_dtype(&self) -> Option<&DType>

Returns the dtype of the column the zones summarise, when this is a pruning plan.

Source

pub fn data_plan(&self) -> VortexResult<Option<PlanRef>>

Returns the plan producing the summarised data, unless this is a pruning plan.

Source

pub fn zones_plan(&self) -> VortexResult<PlanRef>

Returns the plan producing the zone statistics.

Source

pub fn is_pruning(&self) -> bool

Returns whether this plan represents a zone-backed pruning proof.

Source

pub fn pruning_expression(&self) -> Option<&BoundExpression>

Returns the abstract pruning proof carried by this plan, when present.

Source§

impl<V: PlanVTable> Plan<V>

Source

pub fn from_parts(parts: PlanParts<V>) -> Self

Constructs a plan from explicit parts.

Source

pub fn vtable(&self) -> &V

Returns the vtable.

Source

pub fn data(&self) -> &V::PlanData

Returns operator-specific data.

Source

pub fn dtype(&self) -> &DType

Returns the dtype produced by this plan.

Source

pub fn row_count(&self) -> u64

Returns the number of rows in this plan’s row domain.

Source

pub fn slots(&self) -> &PlanSlots

Returns the child slots without building any child.

Source

pub fn nslots(&self) -> usize

Returns the number of slots, present or absent, without building any child.

Source

pub fn slot(&self, slot: usize) -> VortexResult<Option<PlanRef>>

Returns the plan in slot, building it on first access, or None when the slot is absent.

Source

pub fn slot_required(&self, slot: usize) -> VortexResult<PlanRef>

Returns the plan in slot, or an error when the slot is absent or out of bounds.

Source

pub fn children(&self) -> impl Iterator<Item = VortexResult<&PlanRef>> + '_

The plans of the present slots in slot order. See PlanSlots::children.

Source

pub fn to_plan(&self) -> PlanRef

Erases this typed plan into a shared reference.

Source

pub fn into_plan(self) -> PlanRef

Erases this typed plan into a shared reference.

Trait Implementations§

Source§

impl<V: PlanVTable> Clone for Plan<V>

Source§

fn clone(&self) -> Self

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<V: PlanVTable> Debug for Plan<V>

Source§

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

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

impl<V: PlanVTable> Deref for Plan<V>

Source§

type Target = <V as PlanVTable>::PlanData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<V: PlanVTable> Display for Plan<V>

Source§

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

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

impl<V: PlanVTable> From<Plan<V>> for PlanRef

Source§

fn from(value: Plan<V>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<V> !RefUnwindSafe for Plan<V>

§

impl<V> !UnwindSafe for Plan<V>

§

impl<V> Forget for Plan<V>

§

impl<V> Freeze for Plan<V>
where PhantomData<V>: Freeze,

§

impl<V> Move for Plan<V>

§

impl<V> Send for Plan<V>
where PhantomData<V>: Send,

§

impl<V> Sync for Plan<V>
where PhantomData<V>: Sync,

§

impl<V> Unpin for Plan<V>
where PhantomData<V>: Unpin,

§

impl<V> UnsafeUnpin for Plan<V>

Blanket Implementations§

Source§

impl<T, A, P> Access<T> for P
where A: Access<T> + ?Sized, P: Deref<Target = A>,

Source§

type Guard = <A as Access<T>>::Guard

A guard object containing the value and keeping it alive. Read more
Source§

fn load(&self) -> <P as Access<T>>::Guard

The loading method. Read more
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T, A> DynAccess<T> for A
where A: Access<T>, <A as Access<T>>::Guard: 'static,

Source§

fn load(&self) -> DynGuard<T>

The equivalent of Access::load.
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
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> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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