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 Summary
Nested classes/interfaces inherited from class org.apache.iceberg.schema.SchemaWithPartnerVisitor
SchemaWithPartnerVisitor.PartnerAccessors<P> -
Method Summary
Modifier 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.SchemaWithPartnerVisitor
afterField, afterListElement, afterMapKey, afterMapValue, beforeField, beforeListElement, beforeMapKey, beforeMapValue, schema, visit, visit
-
Method Details
-
visit
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 changesexistingSchema- an existing schemanewSchema- a new schema to compare with the existing
-
visit
public 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 changesexistingSchema- an existing schemanewSchema- a new schema to compare with the existingcaseSensitive- when false, the case of schema's fields are ignored
-
struct
- Overrides:
structin classSchemaWithPartnerVisitor<Integer,Boolean>
-
field
- Overrides:
fieldin classSchemaWithPartnerVisitor<Integer,Boolean>
-
list
- Overrides:
listin classSchemaWithPartnerVisitor<Integer,Boolean>
-
map
public Boolean map(Types.MapType map, Integer partnerId, Boolean isKeyMissing, Boolean isValueMissing) - Overrides:
mapin classSchemaWithPartnerVisitor<Integer,Boolean>
-
variant
- Overrides:
variantin classSchemaWithPartnerVisitor<Integer,Boolean>
-
primitive
- Overrides:
primitivein classSchemaWithPartnerVisitor<Integer,Boolean>
-