Package org.apache.iceberg.schema
Class UnionByNameVisitor
java.lang.Object
org.apache.iceberg.schema.SchemaWithPartnerVisitor<Integer,Boolean>
 
org.apache.iceberg.schema.UnionByNameVisitor
Visitor class that accumulates the set of changes needed to evolve an existing schema into the
 union of the existing and a new schema. Changes are added to an 
UpdateSchema operation.- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.iceberg.schema.SchemaWithPartnerVisitorSchemaWithPartnerVisitor.PartnerAccessors<P>
- 
Method SummaryModifier and TypeMethodDescriptionfield(Types.NestedField field, Integer partnerId, Boolean isFieldMissing) list(Types.ListType list, Integer partnerId, Boolean isElementMissing) map(Types.MapType map, Integer partnerId, Boolean isKeyMissing, Boolean isValueMissing) primitive(Type.PrimitiveType primitive, Integer partnerId) struct(Types.StructType struct, Integer partnerId, List<Boolean> missingPositions) variant(Types.VariantType variant, Integer partnerId) static voidvisit(UpdateSchema api, Schema existingSchema, Schema newSchema) Adds changes needed to produce a union of two schemas to anUpdateSchemaoperation.static voidvisit(UpdateSchema api, Schema existingSchema, Schema newSchema, boolean caseSensitive) Adds changes needed to produce a union of two schemas to anUpdateSchemaoperation.Methods inherited from class org.apache.iceberg.schema.SchemaWithPartnerVisitorafterField, afterListElement, afterMapKey, afterMapValue, beforeField, beforeListElement, beforeMapKey, beforeMapValue, schema, visit, visit
- 
Method Details- 
visitAdds changes needed to produce a union of two schemas to anUpdateSchemaoperation.Changes are accumulated to evolve the existingSchema into a union with newSchema. - Parameters:
- api- an UpdateSchema for adding changes
- existingSchema- an existing schema
- newSchema- a new schema to compare with the existing
 
- 
visitpublic static void visit(UpdateSchema api, Schema existingSchema, Schema newSchema, boolean caseSensitive) Adds changes needed to produce a union of two schemas to anUpdateSchemaoperation.Changes are accumulated to evolve the existingSchema into a union with newSchema. - Parameters:
- api- an UpdateSchema for adding changes
- existingSchema- an existing schema
- newSchema- a new schema to compare with the existing
- caseSensitive- when false, the case of schema's fields are ignored
 
- 
struct- Overrides:
- structin class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
- 
field- Overrides:
- fieldin class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
- 
list- Overrides:
- listin class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
- 
mappublic Boolean map(Types.MapType map, Integer partnerId, Boolean isKeyMissing, Boolean isValueMissing) - Overrides:
- mapin class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
- 
variant- Overrides:
- variantin class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
- 
primitive- Overrides:
- primitivein class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
 
-