Skip to content

Commit

Permalink
feat(polars): implement count distinct
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Mar 27, 2023
1 parent 60e7731 commit aea4ccd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ def struct_column(op):
ops.StandardDev: 'std',
ops.Sum: 'sum',
ops.Variance: 'var',
ops.CountDistinct: 'n_unique',
}

for reduction in _reductions.keys():
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def mean_and_std(v):
lambda t, where: t.bool_col[where].dropna().nunique(),
id='nunique',
marks=pytest.mark.notimpl(
["polars", "pyspark", "datafusion"], raises=com.OperationNotDefinedError
["pyspark", "datafusion"], raises=com.OperationNotDefinedError
),
),
param(
Expand Down

0 comments on commit aea4ccd

Please sign in to comment.