Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13807#discussion_r67887470
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 
---
    @@ -830,6 +830,13 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
           ds.dropDuplicates("_1", "_2"),
           ("a", 1), ("a", 2), ("b", 1))
       }
    +
    +  test("SPARK-16097: Encoders.tuple should handle null object correctly") {
    +    val enc = Encoders.tuple(Encoders.tuple(Encoders.STRING, 
Encoders.STRING), Encoders.STRING)
    +    val data = Seq((("a", "b"), "c"), (null, "d"))
    +    val ds = spark.createDataset(data)(enc)
    +    checkDataset(ds, (("a", "b"), "c"), (null, "d"))
    +  }
    --- End diff --
    
    Actually that is not a valid test as the `ExpressionEncoder` is private and 
should not be used externally. But it does expose this bug and I added this 
test case which is valid externally.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to