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
     
  • Method Summary

    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, List<String> names, List<org.apache.avro.Schema> fields)
     
    org.apache.avro.Schema
    union(org.apache.avro.Schema union, List<org.apache.avro.Schema> options)
     

    Methods inherited from class org.apache.iceberg.avro.AvroSchemaVisitor

    fieldNames, visit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApplyNameMapping

      public ApplyNameMapping(NameMapping nameMapping)
  • Method Details

    • record

      public org.apache.avro.Schema record(org.apache.avro.Schema record, List<String> names, List<org.apache.avro.Schema> fields)
      Overrides:
      record in class AvroSchemaVisitor<org.apache.avro.Schema>
    • union

      public org.apache.avro.Schema union(org.apache.avro.Schema union, List<org.apache.avro.Schema> options)
      Overrides:
      union in class AvroSchemaVisitor<org.apache.avro.Schema>
    • array

      public org.apache.avro.Schema array(org.apache.avro.Schema array, org.apache.avro.Schema element)
      Overrides:
      array in class AvroSchemaVisitor<org.apache.avro.Schema>
    • map

      public org.apache.avro.Schema map(org.apache.avro.Schema map, org.apache.avro.Schema value)
      Overrides:
      map in class AvroSchemaVisitor<org.apache.avro.Schema>
    • primitive

      public org.apache.avro.Schema primitive(org.apache.avro.Schema primitive)
      Overrides:
      primitive in class AvroSchemaVisitor<org.apache.avro.Schema>