-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Schema subclasses contain duplicate fields #3094
Comments
Thanks for reporting and addressing this! it's indeed an issue which should be addressed, possibly similarly to your suggestion but slightly different, to maintain existing compatibility specifically for fluent interface. This would basically mean:
|
@frantuma Thanks for replying... I have some local changes that are basically what you've suggested above. I'll submit a PR soon for this. |
frantuma
added a commit
that referenced
this issue
Feb 4, 2019
fix #3094 - avoid duplicate fields in schema classes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The way in which the various Schema subclasses (e.g. ArraySchema, StringSchema, etc.) are defined means that they are duplicating certain fields. For example, StringSchema is defined like this:
This causes StringSchema to have a DIFFERENT type field than is found in Schema.
To alleviate this, I'm proposing a slight change to Schema like this to introduce a ctor:
and then StringSchema could be changed like this to use this new ctor:
Then BinarySchema could be changed like this:
And ByteArraySchema could be changed like this:
and most of the other Schema subclasses could be changed in a similar way.
Before I submit a PR for these changes, I just wanted to introduce the issue and see if there is general agreement on the solution. I don't think this will make any functional difference in the classes but would make things a little easier when debugging and would just make good "java sense" I think.
Comments?
cc: @wing328
The text was updated successfully, but these errors were encountered: