pub enum AggregateOrderSensitivity {
Insensitive,
HardRequirement,
SoftRequirement,
Beneficial,
}
Expand description
Represents the sensitivity of an aggregate expression to ordering.
Variants§
Insensitive
Indicates that the aggregate expression is insensitive to ordering. Ordering at the input is not important for the result of the aggregator.
HardRequirement
Indicates that the aggregate expression has a hard requirement on ordering. The aggregator cannot produce a correct result unless its ordering requirement is satisfied.
SoftRequirement
Indicates that the aggregator is more efficient when the input is ordered
but can still produce its result correctly regardless of the input ordering.
This is similar to, but stronger than, Self::Beneficial
.
Similarly to Self::HardRequirement
, when possible DataFusion will insert
a SortExec
, to reorder the input to match the SoftRequirement. However,
when such a SortExec
cannot be inserted, (for example, due to conflicting
Self::HardRequirement
with other ordered aggregates in the query),
the aggregate function will still execute, without the preferred order, unlike
with Self::HardRequirement
Beneficial
Indicates that ordering is beneficial for the aggregate expression in terms of evaluation efficiency. The aggregator can produce its result efficiently when its required ordering is satisfied; however, it can still produce the correct result (albeit less efficiently) when its required ordering is not met.
Implementations§
Source§impl AggregateOrderSensitivity
impl AggregateOrderSensitivity
pub fn is_insensitive(&self) -> bool
pub fn is_beneficial(&self) -> bool
pub fn hard_requires(&self) -> bool
Trait Implementations§
Source§impl Clone for AggregateOrderSensitivity
impl Clone for AggregateOrderSensitivity
Source§fn clone(&self) -> AggregateOrderSensitivity
fn clone(&self) -> AggregateOrderSensitivity
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AggregateOrderSensitivity
impl Debug for AggregateOrderSensitivity
impl Copy for AggregateOrderSensitivity
impl Eq for AggregateOrderSensitivity
impl StructuralPartialEq for AggregateOrderSensitivity
Auto Trait Implementations§
impl Freeze for AggregateOrderSensitivity
impl RefUnwindSafe for AggregateOrderSensitivity
impl Send for AggregateOrderSensitivity
impl Sync for AggregateOrderSensitivity
impl Unpin for AggregateOrderSensitivity
impl UnwindSafe for AggregateOrderSensitivity
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<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