pub enum StatisticalAggregateExecutionMode {
DataFusionExactHostWelford,
GpuNativeTolerant,
}Expand description
Execution contract for floating statistical aggregates such as
STDDEV_SAMP, STDDEV_POP, VAR_SAMP, and VAR_POP.
Self::DataFusionExactHostWelford requires the supported DataFusion
aggregate semantics and a validated input-order and evaluation contract.
Bit-for-bit equivalence is claimed only for that contract. If the required
contract is unavailable, planning rejects the native candidate, and a
surrounding join or final sort does not supply exactness.
Self::GpuNativeTolerant remains the default and does not promise
bit-for-bit equivalence with DataFusion.
Variants§
DataFusionExactHostWelford
Evaluate DataFusion’s Welford accumulator on the host over the aggregate input, in DataFusion input order where the plan carries it.
Aggregates in the same spec keep DataFusion’s integer and NaN
semantics. Planning rejects group-key and aggregate types that this
host kernel does not cover, as well as ungrouped floating SUM and AVG,
which DataFusion accumulates batch by batch. Those plans remain on
DataFusion. A NaN result matches as a NaN, with no bit-for-bit equality.
An add of two NaN operands keeps the sign of the operand the compiler
places first, in DataFusion and in this kernel alike.
GpuNativeTolerant
Uses libcudf native grouped and scalar statistical kernels with each aggregate’s declared degrees of freedom. This mode is the default.
Variance is derived from sum and sum-of-squares moments, while DataFusion uses Welford updates. Floating-point results can differ from DataFusion, and precision degrades when values are large relative to their spread.
Implementations§
Source§impl StatisticalAggregateExecutionMode
impl StatisticalAggregateExecutionMode
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable snake-case mode label used in env vars and reports.
Sourcepub const fn tolerance_contract(self) -> StatisticalAggregateToleranceContract
pub const fn tolerance_contract(self) -> StatisticalAggregateToleranceContract
Floating parity contract required by this execution mode.
Sourcepub const fn is_datafusion_exact(self) -> bool
pub const fn is_datafusion_exact(self) -> bool
Returns true when execution must preserve DataFusion’s exact Welford bits.
Admission reads this to decide whether a plan with floating statistical aggregates is rejected for group-key or aggregate types the host kernel does not cover; under the tolerant mode those plans run on libcudf.
Trait Implementations§
Source§impl Clone for StatisticalAggregateExecutionMode
impl Clone for StatisticalAggregateExecutionMode
Source§fn clone(&self) -> StatisticalAggregateExecutionMode
fn clone(&self) -> StatisticalAggregateExecutionMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StatisticalAggregateExecutionMode
Source§impl Default for StatisticalAggregateExecutionMode
impl Default for StatisticalAggregateExecutionMode
Source§fn default() -> StatisticalAggregateExecutionMode
fn default() -> StatisticalAggregateExecutionMode
impl Eq for StatisticalAggregateExecutionMode
Source§impl FromStr for StatisticalAggregateExecutionMode
impl FromStr for StatisticalAggregateExecutionMode
Source§type Err = StatisticalAggregateExecutionModeParseError
type Err = StatisticalAggregateExecutionModeParseError
Source§fn from_str(
value: &str,
) -> Result<StatisticalAggregateExecutionMode, <StatisticalAggregateExecutionMode as FromStr>::Err>
fn from_str( value: &str, ) -> Result<StatisticalAggregateExecutionMode, <StatisticalAggregateExecutionMode as FromStr>::Err>
s to return a value of this type. Read moreimpl StructuralPartialEq for StatisticalAggregateExecutionMode
Auto Trait Implementations§
impl Freeze for StatisticalAggregateExecutionMode
impl RefUnwindSafe for StatisticalAggregateExecutionMode
impl Send for StatisticalAggregateExecutionMode
impl Sync for StatisticalAggregateExecutionMode
impl Unpin for StatisticalAggregateExecutionMode
impl UnsafeUnpin for StatisticalAggregateExecutionMode
impl UnwindSafe for StatisticalAggregateExecutionMode
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
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request