File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,16 @@ pub fn avg(expression: PyExpr, distinct: bool) -> PyResult<PyExpr> {
97
97
}
98
98
}
99
99
100
+ #[ pyfunction]
101
+ pub fn corr ( y : PyExpr , x : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
102
+ let expr = functions_aggregate:: expr_fn:: corr ( y. expr , x. expr ) ;
103
+ if distinct {
104
+ Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
105
+ } else {
106
+ Ok ( expr. into ( ) )
107
+ }
108
+ }
109
+
100
110
#[ pyfunction]
101
111
pub fn sum ( args : PyExpr ) -> PyExpr {
102
112
functions_aggregate:: expr_fn:: sum ( args. expr ) . into ( )
@@ -759,7 +769,6 @@ array_fn!(flatten, array);
759
769
array_fn ! ( range, start stop step) ;
760
770
761
771
aggregate_function ! ( array_agg, ArrayAgg ) ;
762
- aggregate_function ! ( corr, Correlation ) ;
763
772
aggregate_function ! ( grouping, Grouping ) ;
764
773
aggregate_function ! ( max, Max ) ;
765
774
aggregate_function ! ( mean, Avg ) ;
You can’t perform that action at this time.
0 commit comments