Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Namespaced case class and Namespace-less schema: Avro fails to resolve if record is part of a union #11

Open
julianpeeters opened this issue May 8, 2015 · 2 comments

Comments

@julianpeeters
Copy link
Owner

Records in namespace-less schemas are most naturally represented by case classes in the default package (i.e. no package). That's not very useful, so it's nice that Avro can resolve the record just fine if the case class is in a package when there is no namespace in the schema, however reading and writing fails for records whose fields are unions of record types.

The issues seem to be due to the mismatch between a) the expected and actual schemas, and b) the full names of records vs specific classes. Avro tries to resolve the record found in the union but no class matches the full name.

Thus, I believe this is an Avro issue, but so far no response on the users mailing list:
http://apache-avro.679487.n3.nabble.com/Issues-reading-and-writing-namespace-less-schemas-from-namespaced-Specific-Records-tc4032092.html

@aakoshh
Copy link
Contributor

aakoshh commented Dec 20, 2016

Perhaps #37 has to do something with it.

@julianpeeters
Copy link
Owner Author

The idea is certainly appreciated! Unfortunately the error even occurs when using Java Avro exclusively.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants