-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
Description
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.