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