Package org.apache.iceberg.avro
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 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 Summary
Constructors Constructor Description AvroWithPartnerByStructureVisitor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description T
array(P sArray, org.apache.avro.Schema array, T element)
protected abstract P
arrayElementType(P arrayType)
protected abstract Pair<java.lang.String,P>
fieldNameAndType(P structType, int pos)
protected abstract boolean
isMapType(P type)
protected abstract boolean
isStringType(P type)
T
map(P sMap, org.apache.avro.Schema map, T value)
T
map(P sMap, org.apache.avro.Schema map, T key, T value)
protected abstract P
mapKeyType(P mapType)
protected abstract P
mapValueType(P mapType)
protected abstract P
nullType()
T
primitive(P type, org.apache.avro.Schema primitive)
T
record(P struct, org.apache.avro.Schema record, java.util.List<java.lang.String> names, java.util.List<T> fields)
T
union(P type, org.apache.avro.Schema union, java.util.List<T> options)
static <P,T>
Tvisit(P partner, org.apache.avro.Schema schema, AvroWithPartnerByStructureVisitor<P,T> visitor)
-
-
-
Method Detail
-
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)
-
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)
-
-