Package org.apache.iceberg.avro
Class ApplyNameMapping
- java.lang.Object
-
- org.apache.iceberg.avro.AvroSchemaVisitor<org.apache.avro.Schema>
-
- org.apache.iceberg.avro.ApplyNameMapping
-
public class ApplyNameMapping extends AvroSchemaVisitor<org.apache.avro.Schema>
An Avro Schema visitor to apply a name mapping to add Iceberg field IDs.Methods return null when a schema has no ID and cannot be projected.
-
-
Constructor Summary
Constructors Constructor Description ApplyNameMapping(NameMapping nameMapping)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.avro.Schema
array(org.apache.avro.Schema array, org.apache.avro.Schema element)
org.apache.avro.Schema
map(org.apache.avro.Schema map, org.apache.avro.Schema value)
org.apache.avro.Schema
primitive(org.apache.avro.Schema primitive)
org.apache.avro.Schema
record(org.apache.avro.Schema record, java.util.List<java.lang.String> names, java.util.List<org.apache.avro.Schema> fields)
org.apache.avro.Schema
union(org.apache.avro.Schema union, java.util.List<org.apache.avro.Schema> options)
-
Methods inherited from class org.apache.iceberg.avro.AvroSchemaVisitor
fieldNames, visit
-
-
-
-
Constructor Detail
-
ApplyNameMapping
public ApplyNameMapping(NameMapping nameMapping)
-
-
Method Detail
-
record
public org.apache.avro.Schema record(org.apache.avro.Schema record, java.util.List<java.lang.String> names, java.util.List<org.apache.avro.Schema> fields)
- Overrides:
record
in classAvroSchemaVisitor<org.apache.avro.Schema>
-
union
public org.apache.avro.Schema union(org.apache.avro.Schema union, java.util.List<org.apache.avro.Schema> options)
- Overrides:
union
in classAvroSchemaVisitor<org.apache.avro.Schema>
-
array
public org.apache.avro.Schema array(org.apache.avro.Schema array, org.apache.avro.Schema element)
- Overrides:
array
in classAvroSchemaVisitor<org.apache.avro.Schema>
-
map
public org.apache.avro.Schema map(org.apache.avro.Schema map, org.apache.avro.Schema value)
- Overrides:
map
in classAvroSchemaVisitor<org.apache.avro.Schema>
-
primitive
public org.apache.avro.Schema primitive(org.apache.avro.Schema primitive)
- Overrides:
primitive
in classAvroSchemaVisitor<org.apache.avro.Schema>
-
-