Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3715#discussion_r23909226
  
    --- Diff: 
core/src/test/scala/org/apache/spark/api/python/PythonRDDSuite.scala ---
    @@ -23,11 +23,21 @@ import org.scalatest.FunSuite
     
     class PythonRDDSuite extends FunSuite {
     
    -    test("Writing large strings to the worker") {
    -        val input: List[String] = List("a"*100000)
    -        val buffer = new DataOutputStream(new ByteArrayOutputStream)
    -        PythonRDD.writeIteratorToStream(input.iterator, buffer)
    -    }
    +  test("Writing large strings to the worker") {
    +    val input: List[String] = List("a"*100000)
    +    val buffer = new DataOutputStream(new ByteArrayOutputStream)
    +    PythonRDD.writeIteratorToStream(input.iterator, buffer)
    +  }
     
    -}
    +  test("Handle nulls gracefully") {
    +    val buffer = new DataOutputStream(new ByteArrayOutputStream)
    +    PythonRDD.writeIteratorToStream(List("a", null).iterator, buffer)
    +    PythonRDD.writeIteratorToStream(List(null, "a").iterator, buffer)
    +    PythonRDD.writeIteratorToStream(List("a".getBytes, null).iterator, 
buffer)
    +    PythonRDD.writeIteratorToStream(List(null, "a".getBytes).iterator, 
buffer)
     
    +    PythonRDD.writeIteratorToStream(List((null, null), ("a", null), (null, 
"b")).iterator, buffer)
    --- End diff --
    
    This is a test in Python to verify that (but not cover all the cases).


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