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
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
func: FuncIdItems(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).
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.
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.
Shift
input moved offset items along cat (in order); where no cell
lands, default (when given) at the input’s own coordinates.
Fields
cat: CategoryIdFuncCall
A (non-aggregating) function call over its argument plans.
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.
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.
Trait Implementations§
Source§impl Clone for PlanNodeKind
impl Clone for PlanNodeKind
Source§fn clone(&self) -> PlanNodeKind
fn clone(&self) -> PlanNodeKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlanNodeKind
impl Debug for PlanNodeKind
Source§impl PartialEq for PlanNodeKind
impl PartialEq for PlanNodeKind
impl StructuralPartialEq for PlanNodeKind
Auto Trait Implementations§
impl Freeze for PlanNodeKind
impl RefUnwindSafe for PlanNodeKind
impl Send for PlanNodeKind
impl Sync for PlanNodeKind
impl Unpin for PlanNodeKind
impl UnsafeUnpin for PlanNodeKind
impl UnwindSafe for PlanNodeKind
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,
impl<T> Data for Twhere
T: Clone + 'static,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign, for types that do not implement AddAssign.