pub struct Aggregate { /* private fields */ }Expand description
One aggregate column of a GroupSpec: what it computes, over which column, and its name
in the result.
Implementations§
Source§impl Aggregate
impl Aggregate
Sourcepub fn sum(column: impl Into<String>) -> Self
pub fn sum(column: impl Into<String>) -> Self
Sum of an integer, decimal or float column’s non-null values; null when there are none.
Integers and decimals sum exactly (see Groups::to_batch for the result types).
Floats sum with compensation for rounding, so the error stays near that of one
rounding of the largest partial sum the group has held; the sum is NaN when a value is
NaN or both infinities occur, and infinite when one does. Named sum(column).
Sourcepub fn min(column: impl Into<String>) -> Self
pub fn min(column: impl Into<String>) -> Self
Smallest non-null value of any column views can sort, in their order: -0.0 equals
0.0, NaN sorts after infinity. Named min(column).
Sourcepub fn max(column: impl Into<String>) -> Self
pub fn max(column: impl Into<String>) -> Self
Largest non-null value of any column views can sort, in their order: NaN if the
column holds one. Named max(column).