Skip to content

Commit

Permalink
Removed relativeSD validation from python API,RDD.scala will do valid…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
Vinod K C committed May 8, 2015
1 parent 122d378 commit b1b00a3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2237,10 +2237,7 @@ def countApproxDistinct(self, relativeSD=0.05):
>>> 16 < n < 24
True
"""
if relativeSD < 0.000017:
raise ValueError("relativeSD should be greater than 0.000017")
if relativeSD > 0.37:
raise ValueError("relativeSD should be smaller than 0.37")

# the hash space in Java is 2^32
hashRDD = self.map(lambda x: portable_hash(x) & 0xFFFFFFFF)
return hashRDD._to_java_object_rdd().countApproxDistinct(relativeSD)
Expand Down

0 comments on commit b1b00a3

Please sign in to comment.