Skip to content

Commit 3f3738d

Browse files
committed
feat(polars): implement approx_nunique
1 parent fb22e20 commit 3f3738d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ibis/backends/polars/compiler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ def struct_column(op, **kw):
708708
ops.All: "all",
709709
ops.Any: "any",
710710
ops.ApproxMedian: "median",
711+
ops.ApproxCountDistinct: "approx_n_unique",
711712
ops.Count: "count",
712713
ops.CountDistinct: "n_unique",
713714
ops.Max: "max",

ibis/backends/tests/test_aggregation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,6 @@ def mean_and_std(v):
478478
lambda t, where: t.string_col.approx_nunique(where=where),
479479
lambda t, where: t.string_col[where].nunique(),
480480
id="approx_nunique",
481-
marks=[
482-
pytest.mark.notimpl(["polars"], raises=com.OperationNotDefinedError),
483-
],
484481
),
485482
param(
486483
lambda t, where: t.bigint_col.bit_and(where=where),

0 commit comments

Comments
 (0)