Skip to content
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

AVRO-1723 #79

Merged
merged 30 commits into from
May 19, 2017
Merged

AVRO-1723 #79

merged 30 commits into from
May 19, 2017

Conversation

zolyfarkas
Copy link
Contributor

Implementation for IDL forward declarations... actually declaration order does not matter anymore...

Conflicts:
	lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java
Conflicts:
	lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java
Conflicts:
	lang/java/avro/src/main/java/org/apache/avro/io/parsing/Symbol.java

/**
*
* @author zoly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we don't use @author tags.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another nit: please use 2-spaces for indentation to match the rest of the project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will clean this up, automatically added by the IDE.

@zolyfarkas
Copy link
Contributor Author

Ryan, I have updated branch with all your suggestions where I see no disagreement.
Let me know what you think about the others and about my explanations...
Looking forward of getting this into the codebase!

cheers!

@@ -1465,7 +1465,10 @@ Schema ReferenceType():
name = namespace + "." + name;
Schema type = names.get(name);
if (type == null)
throw error("Undefined name '" + name + "'", token);
//throw error("Undefined name '" + name + "'", token);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed rather than commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, will remove.

@rdblue
Copy link
Contributor

rdblue commented Apr 16, 2016

Zoltan, thanks for making those changes. I've added a few more comments from a more in-depth review.

@zolyfarkas
Copy link
Contributor Author

Ryan, I have updated the code with your suggestions, some comments and a few renames, please take another look and let me know if it makes more sense. thank you.

@rdblue
Copy link
Contributor

rdblue commented May 8, 2016

@zolyfarkas, I still don't think it is clear why there are both resolve and intern methods. Can this be done with a single resolve method? There isn't much difference between what they do and there's a lot of duplicated code between the two.

@zolyfarkas
Copy link
Contributor Author

@rdblue, will take some time in the next 2 weeks and simplify this code and attempt to create a traversal utility as you suggested

@zolyfarkas
Copy link
Contributor Author

@rdblue Ryan, I have a first version of a Schema visitor implementation:

https://github.com/zolyfarkas/spf4j/blob/master/spf4j-avro/src/main/java/org/spf4j/avro/schema/Schemas.java#L75

The visitor interface:

https://github.com/zolyfarkas/spf4j/blob/master/spf4j-avro/src/main/java/org/spf4j/avro/schema/SchemaVisitor.java

A particular implementation:

https://github.com/zolyfarkas/spf4j/blob/master/spf4j-avro/src/main/java/org/spf4j/avro/schema/CloningVisitor.java

It is still work in progress since I am using it in other use cases and might adapt it to make it easier to use...

Sorry for the slow progress, looking forward for your input...

@zolyfarkas
Copy link
Contributor Author

Changed code to use a more generic schema walker...

@asfgit asfgit merged commit 9d76342 into apache:master May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants