dongjoon-hyun commented on a change in pull request #23620: [SPARK-26696][SQL] 
Makes Dataset encoder public
URL: https://github.com/apache/spark/pull/23620#discussion_r255353950
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
 ##########
 @@ -139,6 +139,14 @@ class DatasetSuite extends QueryTest with 
SharedSQLContext {
       ("a", 1), ("b", 2))
   }
 
+  test("as tuple using instance encoder") {
+    val data = Seq(("a", 1), ("b", 2), ("c", 3))
+    val ds = data.toDS()
+    checkDataset(
+      ds.toDF().as[(String, Int)](ds.encoder),
 
 Review comment:
   @ssimeonov . What @gatorsmile meant is that the following test works without 
your patch. So, the question is why do we need your patch? Please provide a 
valid test case instead of just a simple `ds.encoder` usage.
   ```scala
     test("as tuple using instance encoder") {
       val data = Seq(("a", 1), ("b", 2), ("c", 3))
       val ds = data.toDS()
       checkDataset(
         ds.toDF().as[(String, Int)],
         data: _*)
     }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to