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 122d378 commit b1b00a3Copy full SHA for b1b00a3
python/pyspark/rdd.py
@@ -2237,10 +2237,7 @@ 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
- if relativeSD > 0.37:
2243
- raise ValueError("relativeSD should be smaller than 0.37")
+
2244
# the hash space in Java is 2^32
2245
hashRDD = self.map(lambda x: portable_hash(x) & 0xFFFFFFFF)
2246
return hashRDD._to_java_object_rdd().countApproxDistinct(relativeSD)
0 commit comments