We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 799976e commit 3a3d59cCopy full SHA for 3a3d59c
python/pyspark/rdd.py
@@ -2237,6 +2237,8 @@ def countApproxDistinct(self, relativeSD=0.05):
2237
>>> 16 < n < 24
2238
True
2239
"""
2240
+ if relativeSD < 0.000017:
2241
+ raise ValueError("relativeSD should be greater than 0.000017")
2242
# the hash space in Java is 2^32
2243
hashRDD = self.map(lambda x: portable_hash(x) & 0xFFFFFFFF)
2244
return hashRDD._to_java_object_rdd().countApproxDistinct(relativeSD)
0 commit comments