Description
A common Avro mistake is to declare optional fields as follows:
"type": ["string", "null"], "default": null
This fails at runtime since the default value's type (null) doesn't match the type of the first type in the union (string). The correct declaration is:
"type": ["null", "string"], "default": null
Doug suggested that we throw an exception at schema parse time for cases like this. To ensure backwards compatibility we could make it optional; tools could emit a warning.