I think this is simply a feature that has not been added. It appears at quick glance to be a compatible specification change (it does not break old code or change the binary format).
Please open a JIRA ticket explaining the use case and we can continue discussion there. On 5/23/13 7:51 AM, "Jim Donofrio" <[email protected]> wrote: >The schema resolution page says: > > > if both are enums: > > if the writer's symbol is not present in the reader's enum, then an >error is signalled. > >Is there a reason you could not allow us to provide one of the symbols >as a default in the reader so that when the reader read the enum with >symbol it didnt have, that new symbol would get defaulted to the default >symbol we provide? > >For example with the below schema's this would currently fail if the old >reader encountered a Enum1.C in the data. Why not provide users the >option to set "default": "A" for example so that any unknown enum's are >bined into one? The user might have an unknown enum or something. >Currently I was going to implement this in my application by just using >an int type and looking up the ordinal of my own Java Enum. If the int >is larger than any of the oridinals, the enum would be set to my own >default value in the enum. > >Thanks. > >Original schema: > >{ > "type": "record", > "name": "EnumExample", > "fields": [ > { > "name": "enum1", > "type": { > "type": "enum", > "name": "Enum1", > "symbols": ["A", "B"] > } > } > ] >} > >New schema: > >{ > "type": "record", > "name": "EnumExample", > "fields": [ > { > "name": "enum1", > "type": { > "type": "enum", > "name": "Enum1", > "symbols": ["A", "B", "C"] > } > } > ] >} >
