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


With regards,
Apache Git Services

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

Reply via email to