Enum datafusion::physical_plan::aggregates::AggregateMode
source · pub enum AggregateMode {
Partial,
Final,
FinalPartitioned,
Single,
SinglePartitioned,
}
Expand description
Hash aggregate modes
Variants§
Partial
Partial aggregate that can be applied in parallel across input partitions
Final
Final aggregate that produces a single partition of output
FinalPartitioned
Final aggregate that works on pre-partitioned data.
This requires the invariant 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
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 tha the input is a single partition (like Final)
SinglePartitioned
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 tha the input 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
source§fn eq(&self, other: &AggregateMode) -> bool
fn eq(&self, other: &AggregateMode) -> bool
self
and other
values to be equal, and is used
by ==
.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<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<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