Class EvolveSchemaVisitor
java.lang.Object
org.apache.iceberg.schema.SchemaWithPartnerVisitor<Integer,Boolean>
 
org.apache.iceberg.flink.sink.dynamic.EvolveSchemaVisitor
Visitor class that accumulates the set of changes needed to evolve an existing schema into the
 target schema. Changes are applied to an 
UpdateSchema operation.
 We support:
- Adding new columns
- Widening the type of existing columsn
- Reordering columns
- Dropping columns
- Renaming columns
- 
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> existingFields) static voidvisit(UpdateSchema api, Schema existingSchema, Schema targetSchema) Adds changes needed to produce the target schema to anUpdateSchemaoperation.Methods inherited from class org.apache.iceberg.schema.SchemaWithPartnerVisitorafterField, afterListElement, afterMapKey, afterMapValue, beforeField, beforeListElement, beforeMapKey, beforeMapValue, schema, variant, visit, visit
- 
Method Details- 
visitAdds changes needed to produce the target schema to anUpdateSchemaoperation.Changes are accumulated to evolve the existingSchema into a targetSchema. - Parameters:
- api- an UpdateSchema for adding changes
- existingSchema- an existing schema
- targetSchema- a new schema to compare with the existing
 
- 
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> 
 
- 
primitive- Overrides:
- primitivein class- SchemaWithPartnerVisitor<Integer,- Boolean> 
 
 
-