EvolvingValidator implements SchemaValidator
FinalYes
Compatibility for combining or evolving datasets - the same invariant a merge, an append and a per-batch validation all need: combining `expected` and `given` must never leave a row holding null in a column that is non-nullable somewhere.
- a shared column must keep a compatible type and must not widen to nullable where the expected side is non-nullable (its rows would then read as null),
- a column in
expectedbut absent fromgivenis allowed only when nullable (given's rows read it as null), - a column in
givenbut absent fromexpectedis allowed only when nullable (expected's rows read it as null).
A required (non-nullable) column that is dropped, added, or type-changed is therefore incompatible.
Interfaces
Methods
Methods
validate()
public
validate(Schema $expected, Schema $given) : ValidationContext