A common Avro mistake is to declare optional fields as follows:
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:
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.