Kriskras99 commented on issue #383:
URL: https://github.com/apache/avro-rs/issues/383#issuecomment-3737724420

   I realised this morning that using the name in resolving would allow the 
following two schemas to resolve correctly:
   ```json
   [{"type": "record", "name": "A", "fields": []},{"type": "record", "name": 
"B", "fields": []}]
   ```
   ```json
   [{"type": "record", "name": "B", "fields": []},{"type": "record", "name": 
"A", "fields": []}]
   ```
   If you do this with the current resolve, than `A` would incorrectly resolve 
to `B`.
   I think this is best solved by changing `Value::resolve(self, schema: 
&Schema) -> Value` to `Value::resolve(self, reader_schema: &Schema, 
writer_schema: &Schema) -> Value`. We can also store the name in the value, but 
that would cause a lot of extra string clones.


-- 
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