spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mengxr <...@git.apache.org>
Subject [GitHub] spark pull request: SPARK-1240: handle the case of empty RDD when ...
Date Thu, 13 Mar 2014 20:11:46 GMT
Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/135#discussion_r10583451
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala ---
    @@ -457,6 +457,10 @@ class RDDSuite extends FunSuite with SharedSparkContext {
     
       test("takeSample") {
         val data = sc.parallelize(1 to 100, 2)
    +    val emptySet = data.mapPartitions { iter => Iterator.empty }
    --- End diff --
    
    Let us create a separate test "takeSample from an empty rdd" and construct an empty rdd
directly:
    ~~
    val emptyRdd = sc.parallelize(Seq.empty[Int], 2)
    ~~


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message