Enum dataflow::render::reduce::ReducePlan [−][src]
pub enum ReducePlan {
Distinct,
DistinctNegated,
Accumulable(AccumulablePlan),
Hierarchical(HierarchicalPlan),
Basic(BasicPlan),
Collation(CollationPlan),
}
Expand description
A ReducePlan
provides a concise description for how we will
execute a given reduce expression.
The provided reduce expression can have no
aggregations, in which case its just a Distinct
and otherwise
it’s composed of a combination of accumulable, hierarchical and
basic aggregations.
We want to try to centralize as much decision making about the shape / general computation of the rendered dataflow graph in this plan, and then make actually rendering the graph be as simple (and compiler verifiable) as possible.
Variants
Plan for not computing any aggregations, just determining the set of distinct keys.
Plan for not computing any aggregations, just determining the set of distinct keys. A specialization of ReducePlan::Distinct maintaining rows not in the output.
Accumulable(AccumulablePlan)
Plan for computing only accumulable aggregations.
Tuple Fields of Accumulable
Hierarchical(HierarchicalPlan)
Plan for computing only hierarchical aggregations.
Tuple Fields of Hierarchical
Basic(BasicPlan)
Plan for computing only basic aggregations.
Tuple Fields of Basic
0: BasicPlan
Collation(CollationPlan)
Plan for computing a mix of different kinds of aggregations. We need to do extra work here to reassemble results back in the requested order.
Tuple Fields of Collation
Implementations
pub fn create_from(
aggregates: Vec<AggregateExpr>,
monotonic: bool,
expected_group_size: Option<usize>
) -> Self
pub fn create_from(
aggregates: Vec<AggregateExpr>,
monotonic: bool,
expected_group_size: Option<usize>
) -> Self
Generate a plan for computing the supplied aggregations.
The resulting plan summarizes what the dataflow to be created and how the aggregations will be executed.
fn create_inner(
typ: ReductionType,
aggregates_list: Vec<(usize, AggregateExpr)>,
monotonic: bool,
expected_group_size: Option<usize>
) -> Self
fn create_inner(
typ: ReductionType,
aggregates_list: Vec<(usize, AggregateExpr)>,
monotonic: bool,
expected_group_size: Option<usize>
) -> Self
Generate a plan for computing the specified type of aggregations.
This function assumes that all of the supplied aggregates are actually of the correct reduction type, and are a subsequence of the total list of requested aggregations.
Reports all keys of produced arrangements.
This is likely either an empty vector, for no arrangement, or a singleton vector containing the list of expressions that key a single arrangement.
fn render<G, T>(
self,
collection: Collection<G, (Row, Row)>,
err_input: Collection<G, DataflowError>,
key_arity: usize,
permutation: Permutation
) -> CollectionBundle<G, Row, T> where
G: Scope,
G::Timestamp: Lattice + Refines<T>,
T: Timestamp + Lattice,
fn render<G, T>(
self,
collection: Collection<G, (Row, Row)>,
err_input: Collection<G, DataflowError>,
key_arity: usize,
permutation: Permutation
) -> CollectionBundle<G, Row, T> where
G: Scope,
G::Timestamp: Lattice + Refines<T>,
T: Timestamp + Lattice,
Render a dataflow based on the provided plan.
The output will be an arrangements that looks the same as if we just had a single reduce operator computing everything together, and this arrangement can also be re-used.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for ReducePlan
impl Send for ReducePlan
impl Sync for ReducePlan
impl Unpin for ReducePlan
impl UnwindSafe for ReducePlan
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more