Package org.apache.iceberg.schema
Class UnionByNameVisitor
- java.lang.Object
-
- org.apache.iceberg.schema.SchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
- org.apache.iceberg.schema.UnionByNameVisitor
-
public class UnionByNameVisitor extends SchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
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 anUpdateSchemaoperation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.iceberg.schema.SchemaWithPartnerVisitor
SchemaWithPartnerVisitor.PartnerAccessors<P>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Booleanfield(Types.NestedField field, java.lang.Integer partnerId, java.lang.Boolean isFieldMissing)java.lang.Booleanlist(Types.ListType list, java.lang.Integer partnerId, java.lang.Boolean isElementMissing)java.lang.Booleanmap(Types.MapType map, java.lang.Integer partnerId, java.lang.Boolean isKeyMissing, java.lang.Boolean isValueMissing)java.lang.Booleanprimitive(Type.PrimitiveType primitive, java.lang.Integer partnerId)java.lang.Booleanstruct(Types.StructType struct, java.lang.Integer partnerId, java.util.List<java.lang.Boolean> missingPositions)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 Detail
-
visit
public static void visit(UpdateSchema api, Schema existingSchema, Schema newSchema)
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 schemacaseSensitive- when false, the case of schema's fields are ignorednewSchema- a new schema to compare with the existing
-
struct
public java.lang.Boolean struct(Types.StructType struct, java.lang.Integer partnerId, java.util.List<java.lang.Boolean> missingPositions)
- Overrides:
structin classSchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
field
public java.lang.Boolean field(Types.NestedField field, java.lang.Integer partnerId, java.lang.Boolean isFieldMissing)
- Overrides:
fieldin classSchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
list
public java.lang.Boolean list(Types.ListType list, java.lang.Integer partnerId, java.lang.Boolean isElementMissing)
- Overrides:
listin classSchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
map
public java.lang.Boolean map(Types.MapType map, java.lang.Integer partnerId, java.lang.Boolean isKeyMissing, java.lang.Boolean isValueMissing)
- Overrides:
mapin classSchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
primitive
public java.lang.Boolean primitive(Type.PrimitiveType primitive, java.lang.Integer partnerId)
- Overrides:
primitivein classSchemaWithPartnerVisitor<java.lang.Integer,java.lang.Boolean>
-
-