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/11 16:57:12 UTC

[GitHub] dongjoon-hyun commented on issue #23620: [SPARK-26696][SQL] Makes Dataset encoder public

dongjoon-hyun commented on issue #23620: [SPARK-26696][SQL] Makes Dataset encoder public
URL: https://github.com/apache/spark/pull/23620#issuecomment-462405179
 
 
   @ssimeonov . It's partially true.
   > the test did not work before as it accessed a private property that this PR made public.
   
   @HyukjinKwon . The following was @ssimeonov 's test case.
   ```
   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),
         data: _*)
     }
   ```
   
   The problem of @ssimeonov 's test case was that the following works . So, @gatorsmile and I had a doubt about that.
   ```
   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: _*)
     }
   ```
   
   What @ssimeonov is saying is that `ds.encoder` will not be parsed.
   
   In addition, @ssimeonov also suggested another example in the comment. But, we prefer to keep this PR simple.

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