Hi Mark, On Mon, Dec 12, 2022 at 7:18 PM Mark Farnan <[email protected]> wrote:
> Hi All, > > A week or so back, I created. > https://issues.apache.org/jira/browse/AVRO-3683 (AVRO RUST) > Yes, sorry! I have a deadline at work and I don't have much time for bigger OSS tasks like this one right now. > I've been trying to figure out if I can implement a solution, however my > rust skills are not up to the task as yet. > > This is currently blocking my use of AVRO-RUST for a new project to > implement an Industry standard communications protocol, which is based on > AVRO. The standard makes extensive use of types referenced in other schema > files. There are some 200+ schema files in the standard. > > On further investigation of the issue, I noticed that if a simple Schema > also has AvroSchema on it, then the schema generated from this WORKS for > the nested types, but the one generated by parse_list does not. (The > Schema from AvroSchema seems to resolve the nested types fine into the > resulting schema). > > NOTE: I CANNOT use 'AvroSchema' for my industry standard schema's, as they > use features AvroSchema does not support. So need parse_list to create > valid schemas. > > I think if parse_list was changed to create schema's which correctly > contained the referenced types, rather than by ref, then this would work > fine. I imagine it will also need logic to not duplicate any given schema > more than once. > I think this is not the right approach here. If it uses the referenced/expanded type then it won't be able to support cyclic/self-referencing types, like the famous LinkedList example. A better approach is to create ResolvedSchema from several Schemas, not just one. This way anything that currently accepts a single schema as parameter, e.g. the Writer, could have the same factory method that accepts &[Schema] I will try to implement it soon! But if someone provides a PR in the meantime it would be awesome! > > Hoping someone can take a look at this. > > Regards > Mark >
