brimdata / zync

Kafka connector to sync Zed lakes to and from Kafka topics
BSD 3-Clause "New" or "Revised" License
18 stars 3 forks source link

encode null field as "null" in zavro.EncodeSchema #50

Closed nwt closed 2 years ago

nwt commented 2 years ago

zavro.EncodeSchema encodes a Zed record field with the null type as an Avro union containing "null" twice (i.e., as ["null","null"]), but Avro unions may not contain more than one unnamed schema of the same type. Fix this by encoding such field as "null" rather than as a union.