use super::*;
pub struct ExprAggNamespace(pub(super) Expr);
impl ExprAggNamespace {
pub fn sum(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Sum }
}
pub fn mean(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Mean }
}
pub fn min(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Min }
}
pub fn max(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Max }
}
pub fn std(self, ddof: u32) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Std { ddof } }
}
pub fn var(self, ddof: u32) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Variance { ddof } }
}
pub fn median(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Median }
}
pub fn any(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Any }
}
pub fn all(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::All }
}
pub fn product(self) -> Expr {
Expr::Reduce { input: Box::new(self.0), agg: ReduceAgg::Product }
}
}