Skip to content

Commit 66f25ed

Browse files
convert covar_pop to expr_fn api
Ref: https://github.com/apache/datafusion/pull/10418/files
1 parent 232ab81 commit 66f25ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/functions.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ pub fn covar_samp(y: PyExpr, x: PyExpr) -> PyExpr {
4040
functions_aggregate::expr_fn::covar_samp(y.expr, x.expr).into()
4141
}
4242

43+
#[pyfunction]
44+
pub fn covar_pop(y: PyExpr, x: PyExpr) -> PyExpr {
45+
functions_aggregate::expr_fn::covar_pop(y.expr, x.expr).into()
46+
}
47+
4348
#[pyfunction]
4449
pub fn covar(y: PyExpr, x: PyExpr) -> PyExpr {
4550
// alias for covar_samp
@@ -575,7 +580,6 @@ aggregate_function!(array_agg, ArrayAgg);
575580
aggregate_function!(avg, Avg);
576581
aggregate_function!(corr, Correlation);
577582
aggregate_function!(count, Count);
578-
aggregate_function!(covar_pop, CovariancePop);
579583
aggregate_function!(grouping, Grouping);
580584
aggregate_function!(max, Max);
581585
aggregate_function!(mean, Avg);

0 commit comments

Comments
 (0)