Glue serde avro to json deserialization includes namespaces and union types #3237
Labels
area/serde
Serialization & Deserialization (plugins)
scope/backend
status/accepted
An issue which has passed triage and has been accepted
type/bug
Something isn't working
Milestone
Originally reported in #3224 , split into a separate issue following the discussion in #3235
When the glue serde deserializes to json from avro, it includes the record namespaces and types in the case of union. This is the first time I'm encountering the behaviour since the python deserializer or the one used in kafka-connect don't follow this behavior
Example:
Original msg:
schema used:
base64 encoded avro msg (just the msg, without the glue-related bytes at the start)
AAIGcm9uFnJvbiBzZXJydXlhAA5zZXJydXlhBAoMAAQABmFiYwL2AQA=
The current glue deserializer shows this msg as:
As you can see it adds
string
,int
, or the record namespacetop_level.generation.name
I fixed this issue locally by adding this line:
encoder.setIncludeNamespace(false);
in the avroRecordToJson methodBut according to the comment in #3235 , that's not a completely valid fix since it can break other stuff?
Before and after the fix:


The text was updated successfully, but these errors were encountered: