@@ -51,12 +51,29 @@ object UnaryDeserializer extends Serializable {
5151 implicit def tryUnaryDeserializer [T : UnaryDeserializer [Id , * ]]: UnaryDeserializer [Try , T ] =
5252 (arguments, inspectors) => Try (id[T ].deserialize(arguments, inspectors))
5353
54- /** Derive Optional UnaryDeserializers. */
5554 implicit def optionalUnaryDeserializer [T : UnaryDeserializer [Id , * ]]: UnaryDeserializer [Id , Option [T ]] =
5655 (arguments, inspectors) => (arguments.headOption, inspectors.headOption).mapN(id[T ].deserialize)
5756
58- /** Derive UnaryDeserializers from ExpressionEncoders. */
59- implicit def expressionEncoderUnaryDeserializer [T : TypeTag : ExpressionEncoder ]: UnaryDeserializer [Id , T ] =
57+ // format: off
58+ /**
59+ * Derive UnaryDeserializers from ExpressionEncoders.
60+ * Intentionally not used for instances implementation, causes the following failure on DataBricks;
61+ * TypeTags are not Kryo serializable by default:
62+ * org.apache.spark.SparkException: Job aborted due to stage failure: Task serialization failed: com.esotericsoftware.kryo.KryoException: java.util.ConcurrentModificationException
63+ * Serialization trace:
64+ * classes (sun.misc.Launcher$AppClassLoader)
65+ * classloader (java.security.ProtectionDomain)
66+ * context (java.security.AccessControlContext)
67+ * acc (com.databricks.backend.daemon.driver.ClassLoaders$LibraryClassLoader)
68+ * classLoader (scala.reflect.runtime.JavaMirrors$JavaMirror)
69+ * mirror (scala.reflect.api.TypeTags$TypeTagImpl)
70+ * evidence$3$1 (com.azavea.hiveless.serializers.UnaryDeserializer$$anonfun$expressionEncoderUnaryDeserializer$2)
71+ * evidence$1$1 (com.azavea.hiveless.serializers.UnaryDeserializer$$anonfun$tryUnaryDeserializer$3)
72+ * dh$1 (com.azavea.hiveless.serializers.GenericDeserializer$$anon$4)
73+ * d$2 (com.azavea.hiveless.serializers.GenericDeserializer$$anon$2)
74+ */
75+ // format: on
76+ def expressionEncoderUnaryDeserializer [T : TypeTag : ExpressionEncoder ]: UnaryDeserializer [Id , T ] =
6077 (arguments, inspectors) => arguments.deserialize[InternalRow ](inspectors).as[T ]
6178
6279 /** Derivation helper deserializer. */
0 commit comments