You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by viirya <gi...@git.apache.org> on 2018/10/21 03:57:48 UTC
[GitHub] spark pull request #22749: [SPARK-25746][SQL] Refactoring ExpressionEncoder ...
Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/22749#discussion_r226846925
--- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders/ExpressionEncoder.scala ---
@@ -43,10 +44,11 @@ import org.apache.spark.util.Utils
* to the name `value`.
*/
object ExpressionEncoder {
+
def apply[T : TypeTag](): ExpressionEncoder[T] = {
- // We convert the not-serializable TypeTag into StructType and ClassTag.
val mirror = ScalaReflection.mirror
- val tpe = typeTag[T].in(mirror).tpe
+ val tpe = ScalaReflection.localTypeOf[T]
--- End diff --
I think it should be fine, but let me revert this change first.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org