Package org.apache.iceberg.types
Class CheckCompatibility
java.lang.Object
org.apache.iceberg.types.TypeUtil.CustomOrderSchemaVisitor<List<String>>
org.apache.iceberg.types.CheckCompatibility
- 
Method SummaryModifier and TypeMethodDescriptionfield(Types.NestedField readField, Supplier<List<String>> fieldErrors) list(Types.ListType readList, Supplier<List<String>> elementErrors) primitive(Type.PrimitiveType readPrimitive) readCompatibilityErrors(Schema readSchema, Schema writeSchema) Returns a list of compatibility errors for reading with the given read schema.struct(Types.StructType readStruct, Iterable<List<String>> fieldErrorLists) typeCompatibilityErrors(Schema readSchema, Schema writeSchema) Returns a list of compatibility errors for writing with the given write schema.typeCompatibilityErrors(Schema readSchema, Schema writeSchema, boolean checkOrdering) Returns a list of compatibility errors for writing with the given write schema.variant(Types.VariantType readVariant) writeCompatibilityErrors(Schema readSchema, Schema writeSchema) Returns a list of compatibility errors for writing with the given write schema.writeCompatibilityErrors(Schema readSchema, Schema writeSchema, boolean checkOrdering) Returns a list of compatibility errors for writing with the given write schema.
- 
Method Details- 
writeCompatibilityErrorsReturns a list of compatibility errors for writing with the given write schema. This includes nullability: writing optional (nullable) values to a required field is an error.- Parameters:
- readSchema- a read schema
- writeSchema- a write schema
- Returns:
- a list of error details, or an empty list if there are no compatibility problems
 
- 
writeCompatibilityErrorspublic static List<String> writeCompatibilityErrors(Schema readSchema, Schema writeSchema, boolean checkOrdering) Returns a list of compatibility errors for writing with the given write schema. This includes nullability: writing optional (nullable) values to a required field is an error Optionally this method allows case where input schema has different ordering than table schema.- Parameters:
- readSchema- a read schema
- writeSchema- a write schema
- checkOrdering- If false, allow input schema to have different ordering than table schema
- Returns:
- a list of error details, or an empty list if there are no compatibility problems
 
- 
typeCompatibilityErrorspublic static List<String> typeCompatibilityErrors(Schema readSchema, Schema writeSchema, boolean checkOrdering) Returns a list of compatibility errors for writing with the given write schema. This checks type compatibility and not nullability: writing optional (nullable) values to a required field is not an error. To check nullability as well as types, Optionally this method allows case where input schema has different ordering than table schema. usewriteCompatibilityErrors(Schema, Schema).- Parameters:
- readSchema- a read schema
- writeSchema- a write schema
- checkOrdering- If false, allow input schema to have different ordering than table schema
- Returns:
- a list of error details, or an empty list if there are no compatibility problems
 
- 
typeCompatibilityErrorsReturns a list of compatibility errors for writing with the given write schema. This checks type compatibility and not nullability: writing optional (nullable) values to a required field is not an error. To check nullability as well as types, usewriteCompatibilityErrors(Schema, Schema).- Parameters:
- readSchema- a read schema
- writeSchema- a write schema
- Returns:
- a list of error details, or an empty list if there are no compatibility problems
 
- 
readCompatibilityErrorsReturns a list of compatibility errors for reading with the given read schema.- Parameters:
- readSchema- a read schema
- writeSchema- a write schema
- Returns:
- a list of error details, or an empty list if there are no compatibility problems
 
- 
schema- Overrides:
- schemain class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
struct- Overrides:
- structin class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
field- Overrides:
- fieldin class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
list- Overrides:
- listin class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
mappublic List<String> map(Types.MapType readMap, Supplier<List<String>> keyErrors, Supplier<List<String>> valueErrors) - Overrides:
- mapin class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
variant- Overrides:
- variantin class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
- 
primitive- Overrides:
- primitivein class- TypeUtil.CustomOrderSchemaVisitor<List<String>>
 
 
-