mzabaluev opened a new issue, #9336:
URL: https://github.com/apache/arrow-rs/issues/9336

   **Describe the bug**
   
   When the reader schema evolves the complex type of a field, e.g. a record, 
together with adding nullability or adding more union variants, arrow-avro 
permits this, but does not properly apply schema resolution. In the `Nullable` 
decoder variant and in the union lookup table, the only information preserved 
is a promotion between primitive types; if the type is a record or an enum, the 
decoder is created without the necessary resolution information to correctly 
read the writer schema.
   
   **To Reproduce**
   
   Create an arrow-avro `Reader` with a reader schema where a record field that 
is non-nullable in the file's writer schema is evolved to be nullable, and at 
the same time a new field is added to the record type (with a default value, as 
required for successful schema resolution).
   When reading the file, the reader tries to parse the record expecting the 
added field to be encoded, overrunning the actual encoded record.
   
   **Expected behavior**
   
   The resolution information for the nullable field should carry the record 
type's resolution, filling in the added field(s) with default values, 
recursively applying per-field resolutions, etc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to