Skip to content

Commit c38c4e4

Browse files
committed
fix doc tests
1 parent 2ab157c commit c38c4e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyspark/rdd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def portable_hash(x):
6262
6363
>>> portable_hash(None)
6464
0
65-
>>> portable_hash((None, 1))
65+
>>> portable_hash((None, 1)) & 0xffffffff
6666
219750521
6767
"""
6868
if x is None:
@@ -2015,7 +2015,7 @@ def countApproxDistinct(self, relativeSD=0.05):
20152015
>>> n = sc.parallelize(range(1000)).map(str).countApproxDistinct()
20162016
>>> 950 < n < 1050
20172017
True
2018-
>>> n = self.sc.parallelize([i % 20 for i in range(1000)]).countApproxDistinct()
2018+
>>> n = sc.parallelize([i % 20 for i in range(1000)]).countApproxDistinct()
20192019
>>> 18 < n < 22
20202020
True
20212021
"""

0 commit comments

Comments
 (0)