You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "ftelnov (via GitHub)" <gi...@apache.org> on 2023/06/02 08:40:13 UTC

[GitHub] [avro] ftelnov commented on pull request #2266: Avro-3767 [Rust] fix complex Ref resolving in Union

ftelnov commented on PR #2266:
URL: https://github.com/apache/avro/pull/2266#issuecomment-1573371685

   Now the fix is ready - might contain some dirty code, please review patiently.
   
   What was the issue: at the resolve_union method, we prematurely resolved all references in the Union. It was done in the wrong way - it was resolving only top-level schemas, without recursive lookup. I think it is bad solution even if it might work after fix - firstly, it adds complexity, secondly it is inconsistent with union validation, which does not do premature Ref resolving.
   
   I suppose, it was done that way because `ResolvedSchema` does not handle external references. I've tried to fix it - I added a possibility to resolve external references to `ResolvedSchema`(with an extra argument and new constructor). And I adjusted `find_schema` method of the union to include external refs handle.


-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org