-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avro1363 C# union schema can now contain multiple entries with the same name and different namespace #131
Conversation
…no fields produced an invalid JSON
…ELinux (see Jira 1925). lang/c++/build.sh refers to the lang/c++/build directory which is empty. These are now fixed.
…SchemaTests to the list of tests. Also revert SELinux changes to build.sh as these should be committed separately
…different namespaces. In Java, this works, but not in C#
Is there anyone in the Avro C# community who can review (and accept) this pull request? |
This looks reasonable to me. @jcustenborder, what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rdblue I'll look at it. I only see one nit.
@@ -52,7 +52,7 @@ public string Namespace | |||
/// <summary> | |||
/// Namespace.Name of the schema | |||
/// </summary> | |||
public string Fullname | |||
public override string Fullname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the override?
@jcustenborder: I've added a virtual Fullname method in the base Schema.cs In the UnionSchema parser that I was trying to fix, I needed to make use of On Fri, Nov 4, 2016 at 8:19 PM, Jeremy Custenborder <
|
This doesn't apply cleanly to master (I checked out and tried to rebase). @Simon24601, could you please rebase on master and squash these commits? Thanks! @jcustenborder, does this look about ready to go in? It sounds like your concern was addressed. |
@rdblue Looks good to me. |
By bringing in `cargo-readme` the canonical source for README.md documentation will be the library documentation, also shown in docs.rs. This commit moves some documentation only in the README into `src/lib.rs` and therefore docs.rs also gets a good update. The downside to this is that there's yet another tool being depended upon and a new template file `README.tpl`. All in all a minor downside I think.
Upgrade to Avro 0.10.1
When processing a UnionSchema, we store a list of all the names that have already been processed. In Java, the fully-resolved names are used (including namespaces), while in C# only the simple name was used. This means that a UnionSchema cannot contain multiple entries with the same name and different namespaces.
I've fixed this by making the code more like the Java, i.e. adding a Fullname method to the base Schema class, and using this when processing the UnionSchema.
I have not checked for the same issue in other languages.