Skip to main content

PlanNodeKind

Enum PlanNodeKind 

Source
pub enum PlanNodeKind {
Show 14 variants InputMeasure(MeasureId), Literal(Value), MapUnary(UnaryOp, Box<PlanNode>), MapBinary(BinaryOp, Box<PlanNode>, Box<PlanNode>), Join { left: Box<PlanNode>, right: Box<PlanNode>, join_keys: Vec<CategoryId>, }, Aggregate { inputs: Vec<PlanNode>, params: Vec<PlanNode>, pred: Option<Box<PlanNode>>, group_by: Vec<CategoryId>, func: FuncId, order: Vec<(CategoryId, Vec<ItemId>)>, window: Option<Window>, per_item: bool, into: Vec<(CategoryId, Vec<ItemId>)>, }, Items(CategoryId, Vec<(ItemId, Value)>), Recurrence { body: Expr, refs: Vec<(MeasureId, PlanNode)>, slots: Vec<(MeasureId, i64, Option<Expr>)>, cat: CategoryId, order: Vec<ItemId>, }, Coalesce { args: Vec<PlanNode>, grid: Option<Vec<(CategoryId, Vec<ItemId>)>>, }, Remap { input: Box<PlanNode>, maps: Remaps, }, Shift { input: Box<PlanNode>, cat: CategoryId, offset: i64, order: Vec<ItemId>, default: Option<Box<PlanNode>>, }, FuncCall { func: FuncId, args: Vec<PlanNode>, }, Fixpoint { init: Expr, body: Expr, max_iter: u32, tolerance: f64, }, If { test: Box<PlanNode>, then: Box<PlanNode>, otherwise: Option<Box<PlanNode>>, spanning: Option<u8>, },
}

Variants§

§

InputMeasure(MeasureId)

The base collection for an input measure.

§

Literal(Value)

A constant, broadcast over the target dimension.

§

MapUnary(UnaryOp, Box<PlanNode>)

§

MapBinary(BinaryOp, Box<PlanNode>, Box<PlanNode>)

Element-wise binary op. Operands are assumed dimension-aligned (the compiler inserts Join nodes to align them first).

§

Join

Align two collections on shared categories (broadcast the smaller over the larger). Result dimension is the union.

Fields

§right: Box<PlanNode>
§join_keys: Vec<CategoryId>

Categories both sides are joined on.

§

Aggregate

Reduce inputs (aligned on their full coordinate; pred filters them) down to group_by. params broadcast one value per group. Rows reach the reduction in item order along order (the reduced categories). With a window (one category, kept), one result per item, each over its window; a [improv_core_model::functions::Kind::PerItem] function also keeps the category.

Fields

§inputs: Vec<PlanNode>
§params: Vec<PlanNode>
§group_by: Vec<CategoryId>
§func: FuncId
§order: Vec<(CategoryId, Vec<ItemId>)>
§window: Option<Window>
§per_item: bool
§into: Vec<(CategoryId, Vec<ItemId>)>

An array function’s landing categories and their items: results fill them row-major (the last category varies fastest); results past the last cell are dropped. Empty: not a list.

§

Items(CategoryId, Vec<(ItemId, Value)>)

A static per-item collection of a category: one cell per item.

§

Recurrence

A recurrence along cat: per group of the other categories, items in order, each cell is body evaluated (by the scalar evaluator) with refs at its coordinate and each slot’s placeholder bound to this measure’s own value back items earlier (or the slot’s default).

Fields

§body: Expr
§refs: Vec<(MeasureId, PlanNode)>
§slots: Vec<(MeasureId, i64, Option<Expr>)>
§cat: CategoryId
§order: Vec<ItemId>
§

Coalesce

An outer union: at each coordinate of the domain, the first of args with a cell there. The domain is every item combination of grid (FILL), else the cells of the arguments whose dimension is the result’s. An argument over fewer categories broadcasts onto the domain; it never adds coordinates of its own.

Fields

§grid: Option<Vec<(CategoryId, Vec<ItemId>)>>
§

Remap

input with its categories renamed (RELABEL, SWAP): per (from, to, items), a cell’s from item becomes to’s item it maps to; a cell whose item has no mapping is dropped. The maps apply at once, so two maps exchange two categories.

Fields

§input: Box<PlanNode>
§maps: Remaps
§

Shift

input moved offset items along cat (in order); where no cell lands, default (when given) at the input’s own coordinates.

Fields

§input: Box<PlanNode>
§cat: CategoryId
§offset: i64
§order: Vec<ItemId>
§default: Option<Box<PlanNode>>
§

FuncCall

A (non-aggregating) function call over its argument plans.

Fields

§func: FuncId
§

Fixpoint

FIXPOINT(init, LAMBDA(r, body), max_iter, tolerance), a measure’s whole formula: init and body as written (the body reads r as functions::lambda_slot(0, 0)). Not a dataflow operator: the engine (session::Engine) solves it host-side, round by round.

Fields

§init: Expr
§body: Expr
§max_iter: u32
§tolerance: f64
§

If

IF(test, then, [otherwise]), evaluated lazily: a cell where the test is true and then has one, where it is false and otherwise has one, and the test’s error where it is an error. spanning names the branch (0 then, 1 otherwise) whose coordinates extend the test to the result’s categories; None when the test already spans them.

Fields

§otherwise: Option<Box<PlanNode>>
§spanning: Option<u8>

Trait Implementations§

Source§

impl Clone for PlanNodeKind

Source§

fn clone(&self) -> PlanNodeKind

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 Debug for PlanNodeKind

Source§

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

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

impl PartialEq for PlanNodeKind

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PlanNodeKind

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
§

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

§

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
§

impl<T> Data for T
where T: Clone + 'static,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

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

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

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

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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.

§

impl<T> ProgressEventTimestamp for T
where T: Data + Debug + Any,

§

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

Upcasts this ProgressEventTimestamp to Any. Read more
§

fn type_name(&self) -> &'static str

Returns the name of the concrete type of this object. Read more
§

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

§

impl<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
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.