Skip to content

Commit aea4ccd

Browse files
committed
feat(polars): implement count distinct
1 parent 60e7731 commit aea4ccd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ibis/backends/polars/compiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ def struct_column(op):
637637
ops.StandardDev: 'std',
638638
ops.Sum: 'sum',
639639
ops.Variance: 'var',
640+
ops.CountDistinct: 'n_unique',
640641
}
641642

642643
for reduction in _reductions.keys():

ibis/backends/tests/test_aggregation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def mean_and_std(v):
282282
lambda t, where: t.bool_col[where].dropna().nunique(),
283283
id='nunique',
284284
marks=pytest.mark.notimpl(
285-
["polars", "pyspark", "datafusion"], raises=com.OperationNotDefinedError
285+
["pyspark", "datafusion"], raises=com.OperationNotDefinedError
286286
),
287287
),
288288
param(

0 commit comments

Comments
 (0)