Skip to content

Commit 7e42e6c

Browse files
committed
Move covar_pop and covar_samp to use macro for aggregates
1 parent 55ebc17 commit 7e42e6c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/functions.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ pub fn sum(args: PyExpr) -> PyExpr {
102102
functions_aggregate::expr_fn::sum(args.expr).into()
103103
}
104104

105-
#[pyfunction]
106-
pub fn covar_samp(y: PyExpr, x: PyExpr) -> PyExpr {
107-
functions_aggregate::expr_fn::covar_samp(y.expr, x.expr).into()
108-
}
109-
110-
#[pyfunction]
111-
pub fn covar_pop(y: PyExpr, x: PyExpr) -> PyExpr {
112-
functions_aggregate::expr_fn::covar_pop(y.expr, x.expr).into()
113-
}
114-
115105
#[pyfunction]
116106
pub fn median(arg: PyExpr) -> PyExpr {
117107
functions_aggregate::expr_fn::median(arg.expr).into()
@@ -813,6 +803,8 @@ aggregate_function!(bool_and);
813803
aggregate_function!(bool_or);
814804
aggregate_function!(corr, y x);
815805
aggregate_function!(count);
806+
aggregate_function!(covar_samp, y x);
807+
aggregate_function!(covar_pop, y x);
816808

817809
fn add_builder_fns_to_window(
818810
window_fn: Expr,

0 commit comments

Comments
 (0)