public class SchemaUtils
extends java.lang.Object
Constructor and Description |
---|
SchemaUtils() |
Modifier and Type | Method and Description |
---|---|
static Schema |
mergeWideningNullable(Schema schema1,
Schema schema2)
Given two schema that have matching types, return a nullable-widened schema.
|
public static Schema mergeWideningNullable(Schema schema1, Schema schema2)
The schemas must have matching types, except for field names which can differ. The returned schema will contain the field names in the first schema. All field types will be nullable if the corresponding field type is nullable in either of the input schemas.