Why all this rewiring?
- core issue is that org.json4s.jackson.JValueSerializer always serializes an JInt as
a BigInt. This is fine for the default ObjectMapper, but in the case of Smile the dataType
of a value is added to the serialized form. On Druid's side certain
values are checked for the correct dataType(like queryContext.minTopNThreshold
must be an int).
- to fix this we introduce an overridden JValueSerializer that checks the value of a
JInt is an integer and serializes it as an Int.
- to introduce the new Serializer we introduce a new
com.fasterxml.jackson.databind.Module, and SerializerResolver
Why all this rewiring? - core issue is that org.json4s.jackson.JValueSerializer always serializes an JInt as a BigInt. This is fine for the default ObjectMapper, but in the case of Smile the dataType of a value is added to the serialized form. On Druid's side certain values are checked for the correct dataType(like queryContext.minTopNThreshold must be an int). - to fix this we introduce an overridden JValueSerializer that checks the value of a JInt is an integer and serializes it as an Int. - to introduce the new Serializer we introduce a new com.fasterxml.jackson.databind.Module, and SerializerResolver