Class DataReader<T>

java.lang.Object
org.apache.iceberg.data.avro.DataReader<T>
All Implemented Interfaces:
org.apache.avro.io.DatumReader<T>, SupportsRowPosition

public class DataReader<T> extends Object implements org.apache.avro.io.DatumReader<T>, SupportsRowPosition
  • Constructor Details

    • DataReader

      protected DataReader(Schema expectedSchema, org.apache.avro.Schema readSchema, Map<Integer,?> idToConstant)
  • Method Details

    • create

      public static <D> DataReader<D> create(Schema expectedSchema, org.apache.avro.Schema readSchema)
    • create

      public static <D> DataReader<D> create(Schema expectedSchema, org.apache.avro.Schema readSchema, Map<Integer,?> idToConstant)
    • setSchema

      public void setSchema(org.apache.avro.Schema newFileSchema)
      Specified by:
      setSchema in interface org.apache.avro.io.DatumReader<T>
    • read

      public T read(T reuse, org.apache.avro.io.Decoder decoder) throws IOException
      Specified by:
      read in interface org.apache.avro.io.DatumReader<T>
      Throws:
      IOException
    • setRowPositionSupplier

      public void setRowPositionSupplier(Supplier<Long> posSupplier)
      Specified by:
      setRowPositionSupplier in interface SupportsRowPosition
    • createStructReader

      protected ValueReader<?> createStructReader(Types.StructType struct, List<ValueReader<?>> fields, Map<Integer,?> idToConstant)