Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/1551#discussion_r15567208
--- Diff: core/src/main/scala/org/apache/spark/api/python/PythonRDD.scala
---
@@ -344,7 +345,12 @@ private[spark] object PythonRDD extends Logging {
throw new SparkException("Unexpected Tuple2 element type " +
pair._1.getClass)
}
case other =>
- throw new SparkException("Unexpected element type " +
first.getClass)
+ if (other == null) {
+ dataOut.writeInt(SpecialLengths.NULL)
+ writeIteratorToStream(iter, dataOut)
--- End diff --
Right, but that's a private API, it doesn't matter. Does our own code do it?
Basically I'm worried that this significantly complicates our code for
something that shouldn't happen. I'd rather have an NPE if our own code later
passes nulls here (cause it really shouldn't be doing that since we control
everything we pass in).
---
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.
---