Github user mengxr commented on a diff in the pull request: https://github.com/apache/spark/pull/135#discussion_r10580151 --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala --- @@ -310,6 +310,9 @@ abstract class RDD[T: ClassTag]( * Return a sampled subset of this RDD. */ def sample(withReplacement: Boolean, fraction: Double, seed: Int): RDD[T] = { + if (fraction < Double.MinValue || fraction > Double.MaxValue) { --- End diff -- The lower bound should be >= 0.0. Sample with replacement can have a faction greater than 1.0.
--- 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. ---