Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5237#discussion_r28199691
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/columnar/ColumnTypeSuite.scala ---
    @@ -229,3 +267,23 @@ class ColumnTypeSuite extends FunSuite with Logging {
         }
       }
     }
    +
    +private[columnar] final case class CustomClass(a: Int, b: Long)
    +
    +private[columnar] object CustomerSerializer extends 
Serializer[CustomClass] {
    +  override def write(kryo: Kryo, output: Output, t: CustomClass) {
    +    output.writeInt(t.a)
    +    output.writeLong(t.b)
    +  }
    +  override def read(kryo: Kryo, input: Input, aClass: Class[CustomClass]): 
CustomClass = {
    +    val a = input.readInt()
    +    val b = input.readLong()
    +    CustomClass(a,b)
    +  }
    +}
    +
    +private[columnar] final class Registrator extends KryoRegistrator {
    +  override def registerClasses(kryo: Kryo) {
    +    kryo.register(classOf[CustomClass], CustomerSerializer)
    +  }
    +}
    --- End diff --
    
    new line at end of file


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to