Skip to content

Mutator class for evolving Schemas conveniently #33

@pereferrera

Description

@pereferrera

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions