Class 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 an UpdateSchema operation.
    • Method Detail

      • visit

        public static void visit​(UpdateSchema api,
                                 Schema existingSchema,
                                 Schema newSchema)
        Adds changes needed to produce a union of two schemas to an UpdateSchema operation.

        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
      • struct

        public java.lang.Boolean struct​(Types.StructType struct,
                                        java.lang.Integer partnerId,
                                        java.util.List<java.lang.Boolean> missingPositions)
        Overrides:
        struct in class SchemaWithPartnerVisitor<java.lang.Integer,​java.lang.Boolean>
      • list

        public java.lang.Boolean list​(Types.ListType list,
                                      java.lang.Integer partnerId,
                                      java.lang.Boolean isElementMissing)
        Overrides:
        list in class SchemaWithPartnerVisitor<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:
        map in class SchemaWithPartnerVisitor<java.lang.Integer,​java.lang.Boolean>