Package org.apache.iceberg.data.avro
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 java.lang.Object implements org.apache.avro.io.DatumReader<T>, SupportsRowPosition
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataReader(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> idToConstant)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <D> DataReader<D>
create(Schema expectedSchema, org.apache.avro.Schema readSchema)
static <D> DataReader<D>
create(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> idToConstant)
protected ValueReader<?>
createStructReader(Types.StructType struct, java.util.List<ValueReader<?>> fields, java.util.Map<java.lang.Integer,?> idToConstant)
T
read(T reuse, org.apache.avro.io.Decoder decoder)
void
setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
void
setSchema(org.apache.avro.Schema newFileSchema)
-
-
-
Constructor Detail
-
DataReader
protected DataReader(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> idToConstant)
-
-
Method Detail
-
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, java.util.Map<java.lang.Integer,?> idToConstant)
-
setSchema
public void setSchema(org.apache.avro.Schema newFileSchema)
- Specified by:
setSchema
in interfaceorg.apache.avro.io.DatumReader<T>
-
read
public T read(T reuse, org.apache.avro.io.Decoder decoder) throws java.io.IOException
- Specified by:
read
in interfaceorg.apache.avro.io.DatumReader<T>
- Throws:
java.io.IOException
-
setRowPositionSupplier
public void setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
- Specified by:
setRowPositionSupplier
in interfaceSupportsRowPosition
-
createStructReader
protected ValueReader<?> createStructReader(Types.StructType struct, java.util.List<ValueReader<?>> fields, java.util.Map<java.lang.Integer,?> idToConstant)
-
-