Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/13260#discussion_r64344334
--- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
@@ -678,27 +678,26 @@ class RDDSuite extends SparkFunSuite with
SharedSparkContext {
}
{
val sample = data.takeSample(withReplacement = true, num = 20)
- assert(sample.size === 20) // Got exactly 100 elements
- assert(sample.toSet.size <= 20, "sampling with replacement returned
all distinct elements")
+ assert(sample.size === 20) // Got exactly 20 elements
assert(sample.forall(x => 1 <= x && x <= n), s"elements not in [1,
$n]")
}
{
val sample = data.takeSample(withReplacement = true, num = n)
- assert(sample.size === n) // Got exactly 100 elements
--- End diff --
n is not 100 anymore.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]