markfarnan commented on PR #2014:
URL: https://github.com/apache/avro/pull/2014#issuecomment-1355729169
Found a problem.
The order the Schema's given to parse_list seems to matter. If they are
passed in descending order of reference, everything works.
If they are passed out of order for references to resolve forward, then
avro_to_datum_schemata panics. (Parse List seems to manage fine with any order)
i.e. if you modify your test thus:, it will panic.
` let schemata: Vec<Schema> = Schema::parse_list(&[SCHEMA_B_STR,
SCHEMA_A_STR]).unwrap();
let schemata: Vec<&Schema> = schemata.iter().collect();
// this is the Schema we want to use for write/read
let schema_b = schemata[0];`
This will be a problem with large schema's. For my use case some Records
have references that use up to 20+ schema's, guarenteeing they are provided in
the right order would be a nightmare.
--
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]