Github user gatorsmile commented on the pull request: https://github.com/apache/spark/pull/10160#issuecomment-162328075 @felixcheung I am not sure if we need to add a test case for `sample`. Normally, using a specific seed is the common way to verify the result of `sample`. The existing test case may be enough? ``` sampled <- sample(df, FALSE, 1.0) expect_equal(nrow(collect(sampled)), count(df)) ``` If needed, maybe we can add something like the below: ``` repeat { if (count(sample(df, FALSE, 0.1)) != count(sample(df, FALSE, 0.1))) { break } } ```
--- 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. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org