@@ -432,25 +432,6 @@ fn col(name: &str) -> PyResult<PyExpr> {
432
432
} )
433
433
}
434
434
435
- // TODO: should we just expose this in python?
436
- /// Create a COUNT(1) aggregate expression
437
- #[ pyfunction]
438
- fn count_star ( ) -> PyExpr {
439
- functions_aggregate:: expr_fn:: count ( lit ( 1 ) ) . into ( )
440
- }
441
-
442
- /// Wrapper for [`functions_aggregate::expr_fn::count`]
443
- /// Count the number of non-null values in the column
444
- #[ pyfunction]
445
- fn count ( expr : PyExpr , distinct : bool ) -> PyResult < PyExpr > {
446
- let expr = functions_aggregate:: expr_fn:: count ( expr. expr ) ;
447
- if distinct {
448
- Ok ( expr. distinct ( ) . build ( ) ?. into ( ) )
449
- } else {
450
- Ok ( expr. into ( ) )
451
- }
452
- }
453
-
454
435
/// Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.
455
436
#[ pyfunction]
456
437
fn case ( expr : PyExpr ) -> PyResult < PyCaseBuilder > {
@@ -830,6 +811,7 @@ aggregate_function!(bit_xor);
830
811
aggregate_function ! ( bool_and) ;
831
812
aggregate_function ! ( bool_or) ;
832
813
aggregate_function ! ( corr, y x) ;
814
+ aggregate_function ! ( count) ;
833
815
834
816
fn add_builder_fns_to_window (
835
817
window_fn : Expr ,
@@ -978,7 +960,6 @@ pub(crate) fn init_module(m: &Bound<'_, PyModule>) -> PyResult<()> {
978
960
m. add_wrapped ( wrap_pyfunction ! ( cosh) ) ?;
979
961
m. add_wrapped ( wrap_pyfunction ! ( cot) ) ?;
980
962
m. add_wrapped ( wrap_pyfunction ! ( count) ) ?;
981
- m. add_wrapped ( wrap_pyfunction ! ( count_star) ) ?;
982
963
m. add_wrapped ( wrap_pyfunction ! ( covar_pop) ) ?;
983
964
m. add_wrapped ( wrap_pyfunction ! ( covar_samp) ) ?;
984
965
m. add_wrapped ( wrap_pyfunction ! ( current_date) ) ?;
0 commit comments