-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-13717][Core] Let RandomSampler can sample with Java iterator #11559
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
|
Test build #52555 has finished for PR 11559 at commit
|
|
retest this please. |
|
Test build #52565 has finished for PR 11559 at commit
|
|
Why was this made a public API? |
|
I think this was made a public API so that people could implement custom sampler logic. I'm not sure why we would want to take Java iterators. |
|
Yea - I don't see why either. |
|
@viirya can you close this? Thanks. |
|
@holdenk @rxin I added the Java iterator support due to the wholestage codegen version of |
|
I will close this now if you really think this is not necessary to better Java compatibility. However, I will go to implement |
|
It seems like we shouldn't use iterators for whole stage codegen. The point is to get rid of iterators. Shouldn't we just have a filter there? |
|
BTW next time it'd be great if you can provide the important context for this pull request directly in the description. Thanks. |
|
Yea, thanks! I will do it next time. As you said, so I will implement |
JIRA: https://issues.apache.org/jira/browse/SPARK-13717
What changes were proposed in this pull request?
Currently
RandomSampler.sampleonly accepts Scala iterator. We should also let it accept Java iterator for better compatibility.How was this patch tested?
Some tests are added into
RandomSamplerSuite.