-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-21778][SQL] Simpler Dataset.sample API in Scala / Java #18988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LGTM |
Test build #80824 has finished for PR 18988 at commit
|
retest this please |
Test build #80831 has finished for PR 18988 at commit
|
retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM, too.
Test build #80836 has finished for PR 18988 at commit
|
retest this please |
Test build #80844 has finished for PR 18988 at commit
|
LGTM too. |
Merged to master. I am hitting network issue. Will update the JIRA manually later. |
Thanks. Do you want to add the Python and R ones? It is a little bit tricky because in Python we would need to detect whether withReplacement is a boolean or a floating point value. If it is a floating point value then we should treat it as the fraction. We better add a test there given the complexity ... |
Yes.. I checked that too. Sure, let me give a try! |
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 ...