spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashic Mahtab <>
Subject Easily creating custom encoders
Date Tue, 21 Mar 2017 17:13:46 GMT
I'm trying to easily create custom encoders for case classes having "unfriendly" fields. I
could just kryo the whole thing, but would like to at least have a few fields in the schema
instead of one binary blob. For example,

case class MyClass(id: UUID, items: Map[String, Double], name: String)

Is there a way to create an Encoder[MyClass] by kryo-ing the things that don't work, and not
the ones that do, while retaining distinct columns? In the previous example, I'd at least
want (binary, binary, String).

Is this possible?


View raw message