pub enum AggregateMode {
Partial,
Final,
FinalPartitioned,
Single,
SinglePartitioned,
}Expand description
Aggregation modes
See Accumulator::state for background information on multi-phase
aggregation and how these modes are used.
Variants§
Partial
One of multiple layers of aggregation, any input partitioning
Partial aggregate that can be applied in parallel across input partitions.
This is the first phase of a multi-phase aggregation.
Final
Final of multiple layers of aggregation, in exactly one partition
Final aggregate that produces a single partition of output by combining the output of multiple partial aggregates.
This is the second phase of a multi-phase aggregation.
This mode requires that the input is a single partition
Note: Adjacent Partial and Final mode aggregation is equivalent to a Single
mode aggregation node. The Final mode is required since this is used in an
intermediate step. The CombinePartialFinalAggregate physical optimizer rule
will replace this combination with Single mode for more efficient execution.
FinalPartitioned
Final of multiple layers of aggregation, input is Partitioned
Final aggregate that works on pre-partitioned data.
This mode requires that all rows with a particular grouping key are in the same partitions, such as is the case with Hash repartitioning on the group keys. If a group key is duplicated, duplicate groups would be produced
Single
Single layer of Aggregation, input is exactly one partition
Applies the entire logical aggregation operation in a single operator, as opposed to Partial / Final modes which apply the logical aggregation using two operators.
This mode requires that the input is a single partition (like Final)
SinglePartitioned
Single layer of Aggregation, input is Partitioned
Applies the entire logical aggregation operation in a single operator, as opposed to Partial / Final modes which apply the logical aggregation using two operators.
This mode requires that the input has more than one partition, and is partitioned by group key (like FinalPartitioned).
Implementations§
Source§impl AggregateMode
impl AggregateMode
Sourcepub fn is_first_stage(&self) -> bool
pub fn is_first_stage(&self) -> bool
Checks whether this aggregation step describes a “first stage” calculation.
In other words, its input is not another aggregation result and the
merge_batch method will not be called for these modes.
Trait Implementations§
Source§impl Clone for AggregateMode
impl Clone for AggregateMode
Source§fn clone(&self) -> AggregateMode
fn clone(&self) -> AggregateMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AggregateMode
impl Debug for AggregateMode
Source§impl PartialEq for AggregateMode
impl PartialEq for AggregateMode
impl Copy for AggregateMode
impl Eq for AggregateMode
impl StructuralPartialEq for AggregateMode
Auto Trait Implementations§
impl Freeze for AggregateMode
impl RefUnwindSafe for AggregateMode
impl Send for AggregateMode
impl Sync for AggregateMode
impl Unpin for AggregateMode
impl UnwindSafe for AggregateMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more