Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/554#discussion_r12007480
--- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala
---
@@ -301,15 +301,25 @@ private[spark] object PythonRDD {
throw new SparkException("Unexpected Tuple2 element type " +
pair._1.getClass)
}
case other =>
- throw new SparkException("Unexpected element type " +
first.getClass)
+ Option(other) match {
--- End diff --
It's more obvious to just do
```scala
if (other == null) {
} else {
}
```
then a pattern matching.
---
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.
---