Class AvroWithPartnerByStructureVisitor<P,​T>

  • Type Parameters:
    P - Partner type.
    T - Return T.
    Direct Known Subclasses:
    AvroWithFlinkSchemaVisitor, AvroWithSparkSchemaVisitor, AvroWithTypeByStructureVisitor

    public abstract class AvroWithPartnerByStructureVisitor<P,​T>
    extends java.lang.Object
    A abstract avro schema visitor with partner type. The visitor rely on the structure matching exactly and are guaranteed that because both schemas are derived from the same Iceberg schema.
    • Constructor Detail

      • AvroWithPartnerByStructureVisitor

        public AvroWithPartnerByStructureVisitor()
    • Method Detail

      • isMapType

        protected abstract boolean isMapType​(P type)
      • isStringType

        protected abstract boolean isStringType​(P type)
      • arrayElementType

        protected abstract P arrayElementType​(P arrayType)
      • mapKeyType

        protected abstract P mapKeyType​(P mapType)
      • mapValueType

        protected abstract P mapValueType​(P mapType)
      • fieldNameAndType

        protected abstract Pair<java.lang.String,​P> fieldNameAndType​(P structType,
                                                                           int pos)
      • nullType

        protected abstract P nullType()
      • record

        public T record​(P struct,
                        org.apache.avro.Schema record,
                        java.util.List<java.lang.String> names,
                        java.util.List<T> fields)
      • union

        public T union​(P type,
                       org.apache.avro.Schema union,
                       java.util.List<T> options)
      • array

        public T array​(P sArray,
                       org.apache.avro.Schema array,
                       T element)
      • map

        public T map​(P sMap,
                     org.apache.avro.Schema map,
                     T key,
                     T value)
      • map

        public T map​(P sMap,
                     org.apache.avro.Schema map,
                     T value)
      • primitive

        public T primitive​(P type,
                           org.apache.avro.Schema primitive)