The default for a union is interpreted as the type of its first branch.

https://avro.apache.org/docs/current/spec.html#Unions

Thus, in your example, if you want a nullable byte array, place "null"
first in the union, e.g.:

{"type":"record","name":"hello","fields":[{"name":"id","type":["null",
"bytes"],"default":null}]}

Doug

On Mon, Jun 4, 2018 at 2:02 AM kant kodali <[EMAIL PROTECTED]> wrote: