The problem was that a Schema corresponding to an Avro Union will get wrapped in an Avro Record to avoid two nested Avro Unions. So this should fix the problem for the cases when Optional, Either or Enum is wrapping one another (and further nesting).
Also, I think that the test suite for the Avro codec need further work. Changing the current test suite to cover all cases using generators, like in the other codecs, might uncover some bugs.
/claim #608
The problem was that a
Schema
corresponding to an Avro Union will get wrapped in an Avro Record to avoid two nested Avro Unions. So this should fix the problem for the cases whenOptional
,Either
orEnum
is wrapping one another (and further nesting).Also, I think that the test suite for the Avro codec need further work. Changing the current test suite to cover all cases using generators, like in the other codecs, might uncover some bugs.