aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCodingCat <zhunansjtu@gmail.com>2014-03-16 22:14:59 -0700
committerMatei Zaharia <matei@databricks.com>2014-03-16 22:14:59 -0700
commitdc9654638f1d781ee1e54348fa41436b27793365 (patch)
tree6b0278c8ca06dd78add6f035aad90d1608354549 /bin
parentf5486e9f75d62919583da5ecf9a9ad00222b2227 (diff)
downloadspark-dc9654638f1d781ee1e54348fa41436b27793365.tar.gz
spark-dc9654638f1d781ee1e54348fa41436b27793365.tar.bz2
spark-dc9654638f1d781ee1e54348fa41436b27793365.zip
SPARK-1240: handle the case of empty RDD when takeSample
https://spark-project.atlassian.net/browse/SPARK-1240 It seems that the current implementation does not handle the empty RDD case when run takeSample In this patch, before calling sample() inside takeSample API, I add a checker for this case and returns an empty Array when it's a empty RDD; also in sample(), I add a checker for the invalid fraction value In the test case, I also add several lines for this case Author: CodingCat <zhunansjtu@gmail.com> Closes #135 from CodingCat/SPARK-1240 and squashes the following commits: fef57d4 [CodingCat] fix the same problem in PySpark 36db06b [CodingCat] create new test cases for takeSample from an empty red 810948d [CodingCat] further fix a40e8fb [CodingCat] replace if with require ad483fd [CodingCat] handle the case with empty RDD when take sample
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions