Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/4534#issuecomment-73946196
  
    This works, so it's not quite empty partitions:
    
    ```
    sc.parallelize(Seq[Int](), 1).isEmpty()
    ```
    
    This also creates an exception, so it's to do with `Seq()` (which is of 
`Nothing`, not `Any`, sorry):
    
    ```
    sc.parallelize(Seq(), 1).take(1)
    ```
    
    I think the problem roughly boils down to this behavior in Scala:
    
    ```
    Seq(Seq().toArray,Seq().toArray).toArray
    java.lang.ArrayStoreException: [Ljava.lang.Object;
    ...
    ```
    
    The problem is the `Nothing` type, rather than emptiness, but I'm still 
scratching my head figuring out the cleanest way to deal with that. 


---
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]

Reply via email to