spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-1630] Turn Null of Java/Scala into None...
Date Tue, 29 Jul 2014 14:44:33 GMT
Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1551#discussion_r15527067
  
    --- 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 --
    
    This method isn't tail-recursive, so this will cause a StackOverflow if you try to write
an iterator with thousands of consecutive nulls.


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