Class AvroWithPartnerByStructureVisitor<P,T>

java.lang.Object
org.apache.iceberg.avro.AvroWithPartnerByStructureVisitor<P,T>
Type Parameters:
P - Partner type.
T - Return T.
Direct Known Subclasses:
AvroWithFlinkSchemaVisitor, AvroWithSparkSchemaVisitor, AvroWithTypeByStructureVisitor

public abstract class AvroWithPartnerByStructureVisitor<P,T> extends 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 Details

    • AvroWithPartnerByStructureVisitor

      public AvroWithPartnerByStructureVisitor()
  • Method Details

    • visit

      public static <P, T> T visit(P partner, org.apache.avro.Schema schema, AvroWithPartnerByStructureVisitor<P,T> visitor)
    • 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<String,P> fieldNameAndType(P structType, int pos)
    • nullType

      protected abstract P nullType()
    • record

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

      public T union(P type, org.apache.avro.Schema union, 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)