Skip to content

Commit db728cc

Browse files
committed
Add tighter bound on approx_distinct for small sizes
1 parent 51b38bb commit db728cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/datafusion/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ def approx_distinct(
19011901
>>> df = ctx.from_pydict({"a": [1, 1, 2, 3]})
19021902
>>> result = df.aggregate(
19031903
... [], [dfn.functions.approx_distinct(dfn.col("a")).alias("v")])
1904-
>>> result.collect_column("v")[0].as_py() >= 2
1904+
>>> result.collect_column("v")[0].as_py() == 3
19051905
True
19061906
"""
19071907
filter_raw = filter.expr if filter is not None else None

0 commit comments

Comments
 (0)