Trouble with Avro serialization of json documents missing fields
The point is, if you declare your field in the schema like this:
{"name": "fieldName", "type": ["int", "null"], default: null }
It's not enough to use a field like optional, try declaring it like this:
{"name": "fieldName", "type": ["null", "int"], default: null }