pub enum AggregateChoice {
Measured,
ArrowMetal,
DataFusion,
}Expand description
Who runs an aggregate the rule replaced.
The rule sees the input’s row count at plan time but not its group count, and the same
aggregate SQL is faster on ArrowMetal at some group counts and slower at others. So a replaced
aggregate is decided when it runs: MetalExec collects its input, and under Measured it
estimates the group count from a sample of the key columns on the CPU and looks the shape up in
the measured table (src/agg_table.rs). It runs on ArrowMetal only where the sweep measured it
ahead; otherwise it hands the node back to DataFusion’s own operators over the same batches.
Variants§
Measured
Estimate the group count and look it up in the measured table (the default). At plan time the rule replaces an aggregate only when the table takes its shape at some group count at the input’s exact row count.
ArrowMetal
Always run a replaced aggregate on ArrowMetal (the benchmark’s crossover sweep, tests).
DataFusion
Always hand a replaced aggregate back to DataFusion (measures the hand-back itself, tests).
Trait Implementations§
Source§impl Clone for AggregateChoice
impl Clone for AggregateChoice
impl Copy for AggregateChoice
Source§impl Debug for AggregateChoice
impl Debug for AggregateChoice
Source§impl Default for AggregateChoice
impl Default for AggregateChoice
impl Eq for AggregateChoice
Source§impl PartialEq for AggregateChoice
impl PartialEq for AggregateChoice
impl StructuralPartialEq for AggregateChoice
Auto Trait Implementations§
impl Freeze for AggregateChoice
impl RefUnwindSafe for AggregateChoice
impl Send for AggregateChoice
impl Sync for AggregateChoice
impl Unpin for AggregateChoice
impl UnsafeUnpin for AggregateChoice
impl UnwindSafe for AggregateChoice
Blanket Implementations§
impl<T> Allocation for T
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,
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