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/07/20 08:32:24 UTC

[GitHub] [spark] viirya commented on a change in pull request #25209: [SPARK-28456][SQL]Add a public API `Encoder.copyEncoder` to allow creating Encoder without touching Scala Reflection

viirya commented on a change in pull request #25209: [SPARK-28456][SQL]Add a public API `Encoder.copyEncoder` to allow creating Encoder without touching Scala Reflection
URL: https://github.com/apache/spark/pull/25209#discussion_r305572944
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/Encoder.scala
 ##########
 @@ -80,4 +80,10 @@ trait Encoder[T] extends Serializable {
    * A ClassTag that can be used to construct an Array to contain a collection of `T`.
    */
   def clsTag: ClassTag[T]
+
+  /**
+   * Create a copied [[Encoder]]. The implementation may just copy internal reusable fields to speed
+   * up the [[Encoder]] creation.
+   */
+  def copyEncoder: Encoder[T]
 
 Review comment:
   Seems good `makeCopy`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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