pub enum AggregateFunction {
Show 35 variants
Count,
Sum,
Min,
Max,
Avg,
Median,
ApproxDistinct,
ArrayAgg,
FirstValue,
LastValue,
Variance,
VariancePop,
Stddev,
StddevPop,
Covariance,
CovariancePop,
Correlation,
RegrSlope,
RegrIntercept,
RegrCount,
RegrR2,
RegrAvgx,
RegrAvgy,
RegrSXX,
RegrSYY,
RegrSXY,
ApproxPercentileCont,
ApproxPercentileContWithWeight,
ApproxMedian,
Grouping,
BitAnd,
BitOr,
BitXor,
BoolAnd,
BoolOr,
}
Expand description
Enum of all built-in aggregate functions
Variants§
Count
count
Sum
sum
Min
min
Max
max
Avg
avg
Median
median
ApproxDistinct
Approximate aggregate function
ArrayAgg
array_agg
FirstValue
first_value
LastValue
last_value
Variance
Variance (Sample)
VariancePop
Variance (Population)
Stddev
Standard Deviation (Sample)
StddevPop
Standard Deviation (Population)
Covariance
Covariance (Sample)
CovariancePop
Covariance (Population)
Correlation
Correlation
RegrSlope
Slope from linear regression
RegrIntercept
Intercept from linear regression
RegrCount
Number of input rows in which both expressions are not null
RegrR2
R-squared value from linear regression
RegrAvgx
Average of the independent variable
RegrAvgy
Average of the dependent variable
RegrSXX
Sum of squares of the independent variable
RegrSYY
Sum of squares of the dependent variable
RegrSXY
Sum of products of pairs of numbers
ApproxPercentileCont
Approximate continuous percentile function
ApproxPercentileContWithWeight
Approximate continuous percentile function with weight
ApproxMedian
ApproxMedian
Grouping
Grouping
BitAnd
Bit And
BitOr
Bit Or
BitXor
Bit Xor
BoolAnd
Bool And
BoolOr
Bool Or
Implementations§
source§impl AggregateFunction
impl AggregateFunction
sourcepub fn return_type(&self, input_expr_types: &[DataType]) -> Result<DataType>
pub fn return_type(&self, input_expr_types: &[DataType]) -> Result<DataType>
Returns the datatype of the aggregate function given its argument types
This is used to get the returned data type for aggregate expr.
Trait Implementations§
source§impl Clone for AggregateFunction
impl Clone for AggregateFunction
source§fn clone(&self) -> AggregateFunction
fn clone(&self) -> AggregateFunction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AggregateFunction
impl Debug for AggregateFunction
source§impl Display for AggregateFunction
impl Display for AggregateFunction
source§impl FromStr for AggregateFunction
impl FromStr for AggregateFunction
§type Err = DataFusionError
type Err = DataFusionError
source§impl Hash for AggregateFunction
impl Hash for AggregateFunction
source§impl IntoEnumIterator for AggregateFunction
impl IntoEnumIterator for AggregateFunction
type Iterator = AggregateFunctionIter
fn iter() -> AggregateFunctionIter ⓘ
source§impl PartialEq<AggregateFunction> for AggregateFunction
impl PartialEq<AggregateFunction> for AggregateFunction
source§fn eq(&self, other: &AggregateFunction) -> bool
fn eq(&self, other: &AggregateFunction) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AggregateFunction> for AggregateFunction
impl PartialOrd<AggregateFunction> for AggregateFunction
source§fn partial_cmp(&self, other: &AggregateFunction) -> Option<Ordering>
fn partial_cmp(&self, other: &AggregateFunction) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for AggregateFunction
impl StructuralEq for AggregateFunction
impl StructuralPartialEq for AggregateFunction
Auto Trait Implementations§
impl RefUnwindSafe for AggregateFunction
impl Send for AggregateFunction
impl Sync for AggregateFunction
impl Unpin for AggregateFunction
impl UnwindSafe for AggregateFunction
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.