HyukjinKwon commented on issue #23620: [SPARK-26696][SQL] Makes Dataset encoder 
public
URL: https://github.com/apache/spark/pull/23620#issuecomment-462224013
 
 
   Also, please clarify what case this PR supports in PR description.  I think 
that's what @gatorsmile initially meant at 
https://github.com/apache/spark/pull/23620#discussion_r252752815.
   
   Is it something to support
   
   ```scala
   def foo[A](ds: Dataset[A]): Dataset[A] =
     ds.toDF().as[A](ds.encoder)
     
   foo(spark.range(1)).show()
   ```
   
   instead of
   
   ```scala
   def foo[A: Encoder](ds: Dataset[A]): Dataset[A] =
     ds.toDF().as[A](implicitly[Encoder[A]])
   
   import spark.implicits._
   foo(spark.range(1)).show()
   ```
   
   ? please be diligent about elaborating it in the PR description. I don't 
particularly support this usecase since it's only few lines diff and I was 
wondering what downside it brings by carrying `Encoder` implicits.

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