GitHub user rxin opened a pull request:
https://github.com/apache/spark/pull/18988
[SPARK-21778][SQL] Simpler Dataset.sample API in Scala / Java
## What changes were proposed in this pull request?
Dataset.sample requires a boolean flag withReplacement as the first
argument. However, most of the time users simply want to sample some records
without replacement. This ticket introduces a new sample function that simply
takes in the fraction and seed.
## How was this patch tested?
Tested manually. Not sure yet if we should add a test case for just this
wrapper ...
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rxin/spark SPARK-21778
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18988.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18988
----
commit a21d8b07a130fc47e76a96935f272cb720ff1250
Author: Reynold Xin <[email protected]>
Date: 2017-08-18T04:45:16Z
[SPARK-21778][SQL] Simpler Dataset.sample API in Scala / Java
----
---
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]