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 Object
implements org.apache.avro.io.DatumReader<T>, SupportsRowPosition
-
Constructor Summary
ModifierConstructorDescriptionprotected
DataReader
(Schema expectedSchema, org.apache.avro.Schema readSchema, Map<Integer, ?> idToConstant) -
Method Summary
Modifier and TypeMethodDescriptionstatic <D> DataReader
<D> static <D> DataReader
<D> protected ValueReader
<?> createStructReader
(Types.StructType struct, List<ValueReader<?>> fields, Map<Integer, ?> idToConstant) void
setRowPositionSupplier
(Supplier<Long> posSupplier) void
setSchema
(org.apache.avro.Schema newFileSchema)
-
Constructor Details
-
DataReader
-
-
Method Details
-
create
-
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 interfaceorg.apache.avro.io.DatumReader<T>
-
read
- Specified by:
read
in interfaceorg.apache.avro.io.DatumReader<T>
- Throws:
IOException
-
setRowPositionSupplier
- Specified by:
setRowPositionSupplier
in interfaceSupportsRowPosition
-
createStructReader
protected ValueReader<?> createStructReader(Types.StructType struct, List<ValueReader<?>> fields, Map<Integer, ?> idToConstant)
-