zsxwing commented on a change in pull request #25209: [SPARK-28456][SQL] Add a
public API `Encoder.makeCopy` to allow creating Encoder without touching Scala
Reflection
URL: https://github.com/apache/spark/pull/25209#discussion_r305639499
##########
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:
@HyukjinKwon `makeCopy` sounds better to me as well. Updated.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]