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

Mutator class for evolving Schemas conveniently #33

Open
pereferrera opened this issue Oct 1, 2013 · 1 comment
Open

Mutator class for evolving Schemas conveniently #33

pereferrera opened this issue Oct 1, 2013 · 1 comment
Assignees

Comments

@pereferrera
Copy link
Contributor

For the next Pangool release I'm working on an utility called "Mutator" that allows to conveniently evolve Schemas. Currently it has these methods:

minusFields(Schema schema, String... minusFields) - returns a Schema like the argument one minus the fields passed as second parameter.

subSetOf(Schema schema, String... subSetFields) - returns a Schema like the argument one containing only the fields passed as second parameter.

superSetOf(Schema schema, Field... newFields) - returns a Schema like the argument one but adding new Fields to it.

jointSchema(Schema leftSchema, Schema rightSchema) - returns a joint Schema of two Schemas, where the left one has priority over the right (first all fields from the left are added, then the ones in the right that are not in left).

Shout if you have more suggestions or feedback.

@ghost ghost assigned pereferrera Oct 1, 2013
@ivanprado
Copy link
Contributor

Some ideas:

2013/10/1 Pere Ferrera notifications@github.com

For the next Pangool release I'm working on an utility called "Mutator"
that allows to conveniently evolve Schemas. Currently it has these methods:

minusFields(Schema schema, String... minusFields) - returns a Schema like the argument one minus the fields passed as second parameter.

subSetOf(Schema schema, String... subSetFields) - returns a Schema like the argument one containing only the fields passed as second parameter.

superSetOf(Schema schema, Field... newFields) - returns a Schema like the argument one but adding new Fields to it.

jointSchema(Schema leftSchema, Schema rightSchema) - returns a joint Schema of two Schemas, where the left one has priority over the right (first all fields from the left are added, then the ones in the right that are not in left).

Shout if you have more suggestions or feedback.


Reply to this email directly or view it on GitHubhttps://github.com//issues/33
.

Iván de Prado
CEO & Co-founder
www.datasalt.com

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

No branches or pull requests

2 participants