Enum dataflow_types::plan::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
Distinct
Plan for not computing any aggregations, just determining the set of distinct keys.
DistinctNegated
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)
Tuple Fields
Plan for computing only accumulable aggregations.
Hierarchical(HierarchicalPlan)
Tuple Fields
Plan for computing only hierarchical aggregations.
Basic(BasicPlan)
Tuple Fields
0: BasicPlan
Plan for computing only basic aggregations.
Collation(CollationPlan)
Tuple Fields
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.
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.
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