You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/06 21:13:54 UTC

[GitHub] ssimeonov commented on a change in pull request #23620: [SPARK-26696][SQL] Makes Dataset encoder public

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

 ##########
 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:
   I am not sure what you mean by a proper example. Given the change in the PR, the only purpose of the test is to show (a) that the `encoder` property can be accessed and (b) that the accessed encoder will work correctly for another dataset instance. In that context, the fact that conversion without providing an explicit encoder is possible is not relevant. Further, adding a more complicated example where implicit conversion is not possible will add nothing to the purpose of the test.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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