pub struct Plan<V: PlanVTable> { /* private fields */ }Expand description
A typed, shared handle to a plan operator.
Implementations§
Source§impl Plan<Concat>
impl Plan<Concat>
Sourcepub fn try_new(dtype: DType, children: Vec<PlanRef>) -> VortexResult<Self>
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.
Sourcepub fn row_offsets(&self) -> &[u64]
pub fn row_offsets(&self) -> &[u64]
Returns the first row of each child within this plan’s row domain.
Source§impl Plan<Eval>
impl Plan<Eval>
Sourcepub fn try_new(
expression: BoundExpression,
child: PlanRef,
) -> VortexResult<Self>
pub fn try_new( expression: BoundExpression, child: PlanRef, ) -> VortexResult<Self>
Creates an evaluation of expression, which must be bound to the child’s dtype.
Sourcepub unsafe fn new_unchecked(expression: BoundExpression, child: PlanRef) -> Self
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.
Sourcepub fn expression(&self) -> &BoundExpression
pub fn expression(&self) -> &BoundExpression
Returns the expression evaluated by this plan.
Sourcepub fn child_plan(&self) -> VortexResult<PlanRef>
pub fn child_plan(&self) -> VortexResult<PlanRef>
Returns the child plan supplying the expression root.
Source§impl Plan<ListPack>
impl Plan<ListPack>
Sourcepub fn try_new(
nullability: Nullability,
row_count: u64,
elements: PlanRef,
offsets: PlanRef,
validity: Option<PlanRef>,
) -> VortexResult<Self>
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.
Sourcepub fn elements(&self) -> VortexResult<PlanRef>
pub fn elements(&self) -> VortexResult<PlanRef>
Returns the plan producing list elements.
Sourcepub fn offsets(&self) -> VortexResult<PlanRef>
pub fn offsets(&self) -> VortexResult<PlanRef>
Returns the plan producing list offsets.
Sourcepub fn validity(&self) -> VortexResult<Option<PlanRef>>
pub fn validity(&self) -> VortexResult<Option<PlanRef>>
Returns the plan producing list validity, if the list is nullable.
Source§impl Plan<Pack>
impl Plan<Pack>
Sourcepub fn try_new(
fields: StructFields,
nullability: Nullability,
row_count: u64,
field_plans: Vec<PlanRef>,
validity: Option<PlanRef>,
) -> VortexResult<Self>
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.
Sourcepub unsafe fn new_unchecked(
fields: StructFields,
nullability: Nullability,
row_count: u64,
field_plans: Vec<PlanRef>,
validity: Option<PlanRef>,
) -> Self
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_planscontains exactly one child per field, in field order;- every field child has the corresponding field dtype and
row_countrows; and validityis present exactly when the struct is nullable and, when present, produces non-nullable booleans withrow_countrows.
Sourcepub fn fields(&self) -> &StructFields
pub fn fields(&self) -> &StructFields
Returns the struct fields assembled by this plan.
Sourcepub fn nfields(&self) -> usize
pub fn nfields(&self) -> usize
Returns the number of struct fields, excluding any validity child.
Sourcepub fn validity(&self) -> VortexResult<Option<PlanRef>>
pub fn validity(&self) -> VortexResult<Option<PlanRef>>
Returns the plan producing struct validity, if the struct is nullable.
Source§impl Plan<SegmentScan>
impl Plan<SegmentScan>
Sourcepub fn new(
dtype: DType,
row_count: u64,
segment_id: SegmentId,
array_ctx: ReadContext,
array_tree: Option<ByteBuffer>,
) -> Self
pub fn new( dtype: DType, row_count: u64, segment_id: SegmentId, array_ctx: ReadContext, array_tree: Option<ByteBuffer>, ) -> Self
Creates a segment scan over segment_id.
Sourcepub fn segment_id(&self) -> SegmentId
pub fn segment_id(&self) -> SegmentId
Returns the segment this plan reads.
Sourcepub fn array_ctx(&self) -> &ReadContext
pub fn array_ctx(&self) -> &ReadContext
Returns the read context for the serialized array.
Sourcepub fn array_tree(&self) -> Option<&ByteBuffer>
pub fn array_tree(&self) -> Option<&ByteBuffer>
Returns the serialized array encoding tree, when it is stored out of line.
Source§impl Plan<Take>
impl Plan<Take>
Sourcepub fn new(codes: PlanRef, values: PlanRef) -> Self
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.
Sourcepub fn codes(&self) -> VortexResult<PlanRef>
pub fn codes(&self) -> VortexResult<PlanRef>
Returns the plan producing indices.
Sourcepub fn values(&self) -> VortexResult<PlanRef>
pub fn values(&self) -> VortexResult<PlanRef>
Returns the plan producing the values being indexed.
Source§impl<V: PlanVTable> Plan<V>
impl<V: PlanVTable> Plan<V>
Sourcepub fn from_parts(parts: PlanParts<V>) -> Self
pub fn from_parts(parts: PlanParts<V>) -> Self
Constructs a plan from explicit parts.
Sourcepub fn children(&self) -> &PlanChildren
pub fn children(&self) -> &PlanChildren
Returns the common child container without initializing any child.
Sourcepub fn child(&self, index: usize) -> VortexResult<Option<PlanRef>>
pub fn child(&self, index: usize) -> VortexResult<Option<PlanRef>>
Returns a child, initializing it on first access.
Sourcepub fn child_required(&self, index: usize) -> VortexResult<PlanRef>
pub fn child_required(&self, index: usize) -> VortexResult<PlanRef>
Returns the child at index, or an error when the index is out of bounds.
Trait Implementations§
Source§impl<V: PlanVTable> Clone for Plan<V>
impl<V: PlanVTable> Clone for Plan<V>
Source§impl<V: PlanVTable> Debug for Plan<V>
impl<V: PlanVTable> Debug for Plan<V>
Source§impl<V: PlanVTable> Deref for Plan<V>
impl<V: PlanVTable> Deref for Plan<V>
Source§impl<V: PlanVTable> Display for Plan<V>
impl<V: PlanVTable> Display for Plan<V>
Auto Trait Implementations§
impl<V> !RefUnwindSafe for Plan<V>
impl<V> !UnwindSafe for Plan<V>
impl<V> Freeze for Plan<V>where
PhantomData<V>: Freeze,
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>where
PhantomData<V>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, A> DynAccess<T> for A
impl<T, A> DynAccess<T> for A
Source§fn load(&self) -> DynGuard<T>
fn load(&self) -> DynGuard<T>
Access::load.Source§impl<K, V, T> Expiry<K, V> for T
impl<K, V, T> Expiry<K, V> for T
Source§fn expire_after_create(
&self,
key: &K,
value: &V,
created_at: Instant,
) -> Option<Duration>
fn expire_after_create( &self, key: &K, value: &V, created_at: Instant, ) -> Option<Duration>
insert and get_with but only when the key
was not present in the cache. Read moreSource§fn expire_after_read(
&self,
key: &K,
value: &V,
read_at: Instant,
duration_until_expiry: Option<Duration>,
last_modified_at: Instant,
) -> Option<Duration>
fn expire_after_read( &self, key: &K, value: &V, read_at: Instant, duration_until_expiry: Option<Duration>, last_modified_at: Instant, ) -> Option<Duration>
get and get_with but only when the key is present in
the cache. Read moreSource§fn expire_after_update(
&self,
key: &K,
value: &V,
updated_at: Instant,
duration_until_expiry: Option<Duration>,
) -> Option<Duration>
fn expire_after_update( &self, key: &K, value: &V, updated_at: Instant, duration_until_expiry: Option<Duration>, ) -> Option<Duration>
insert but only when the key is
already present in the cache. Read moreSource§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
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
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.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
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.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
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.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
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.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
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.