-Re: Schema Resolution for Enums
Doug Cutting 2013-09-27, 19:02
On Thu, Sep 26, 2013 at 6:29 AM, Youssef Hatem
<[EMAIL PROTECTED]> wrote:
> All I can say is that we use the deserialized enum value as it is. So we get zero, which is wrong since zero corresponds to something else in the reader enum.
You need to translate enum values from the writer's to the reader's
schema. This is not difficult, since both are present when you're
reading. An array can be created that maps each value written into
the corresponding value in the reader's schema. In your example this
would be [1,0,2,3], so that when you read a zero you return a 1.