Skip to content

Commit b1b00a3

Browse files
author
Vinod K C
committed
Removed relativeSD validation from python API,RDD.scala will do validation
1 parent 122d378 commit b1b00a3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

python/pyspark/rdd.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,10 +2237,7 @@ def countApproxDistinct(self, relativeSD=0.05):
22372237
>>> 16 < n < 24
22382238
True
22392239
"""
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")
2240+
22442241
# the hash space in Java is 2^32
22452242
hashRDD = self.map(lambda x: portable_hash(x) & 0xFFFFFFFF)
22462243
return hashRDD._to_java_object_rdd().countApproxDistinct(relativeSD)

0 commit comments

Comments
 (0)