Open sami-badawi opened 2 years ago
I tried to debug into the exception at MappedSerializer.scala:17
and change code from:
case class MappedSerializer[A, B](mapper: TypeMapper[A, B], ser: TypeSerializer[B]) extends SimpleSerializer[A] {
override def equals(obj: Any): Boolean = ser.equals(obj)
To:
case class MappedSerializer[A, B](mapper: TypeMapper[A, B], ser: TypeSerializer[B]) extends SimpleSerializer[A] {
override def equals(obj: Any): Boolean = if (obj == null) false else ser.equals(obj)
This should be easily fixable by updating the above method to use ==
, which inherently checks for null
before checking value equality. I'll cut a PR to address this issue & ensure circe JSON is supported @sami-badawi.
I have problems using Flink-ADT to serialize json in circe.Json format.
Approach 1
Here is the error message:
Approach 2
It compiles but crashes when I run unit test.
Approach 3
Based on the
MappedTypeInfoTest.scala
unit test. I created my own versionAnd it failed with this error message:
Question
I would think that circe.Json format is very common among flink-adt users.
Am I just using flink-adt badly with circe.Json, or is this a hard class to serialize?