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-4076: [java] Parse Fields before adding to the context. #3255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jamespfaulkner
Copy link

What is the purpose of the change

This pull request fixes the issue identified by AVRO-4076.

This is potentially not the best way to do this but I think it at least demonstrates what I think the issue is.
In Schema, we put the result into the context, (ultimately leading to the throw). But we haven't loaded the fields at that point, causing the equality check to fail even if the schemas do match.

Unfortunately I had to change the equals in Protocol.java in order to get the tests to pass. The order of schemas returned by ParseContext.resolveAllSchemas has slightly changed. I'm not sure that the order matters, but if I change ParseContext.resolveAllSchemas to return an unordered collection I get failures in TestIdlReader.runTests.

Verifying this change

This change added tests and can be verified as follows:

  • TestSchema::testParseMultipleFile has been updated to include the redefined Schema scenario.

Documentation

  • Does this pull request introduce a new feature? - no
  • If yes, how is the feature documented? not applicable

@github-actions github-actions bot added the Java Pull Requests for Java binding label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant