ultrabug opened a new pull request #1379: URL: https://github.com/apache/avro/pull/1379
When providing your own schema to `from_avro_datum`, the deserialization is not backward compatible with messages containing a previous schema even if the schemas are created to be backward compatible. This is due to the `decode_variable` function in `utils` returning `Error::ReadVariableIntegerBytes` when the reader object is smaller than expected and thus cannot fill the read_exact buffer. Reading a message generated with an older schema version than the one we are statically using, the payload buffer is by essence smaller than the expected payload from a message serialized with a newer schema (backward compatible schemas are basically append only). The proposed fix takes that into account and just returns empty Ok() which will be interpreted as null. This is in line with the fact that a backward compatible schema has to allow for null values to the newly added fields. Make sure you have checked _all_ steps below. ### Jira - [x] [AVRO-3240](https://issues.apache.org/jira/browse/AVRO-3240) ### Tests - [ ] I'd like comments before working on tests -- 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]
