Github user dorx commented on a diff in the pull request: https://github.com/apache/spark/pull/916#discussion_r13720492 --- Diff: python/pyspark/rdd.py --- @@ -365,27 +366,25 @@ def takeSample(self, withReplacement, num, seed=None): fraction = 0.0 total = 0 - multiplier = 3.0 + numStDev = 10.0 initialCount = self.count() - maxSelected = 0 - if (num < 0): + if num < 0: raise ValueError - if (initialCount == 0): + if initialCount == 0: --- End diff -- Actually that would break the unit test "test("takeSample from an empty rdd")" in RDD.scala, hence the reason for moving this if clause up.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---