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
ConstructorsModifierConstructorDescriptionprotectedDataReader(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) voidsetRowPositionSupplier(Supplier<Long> posSupplier) voidsetSchema(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:
setSchemain interfaceorg.apache.avro.io.DatumReader<T>
-
read
- Specified by:
readin interfaceorg.apache.avro.io.DatumReader<T>- Throws:
IOException
-
setRowPositionSupplier
- Specified by:
setRowPositionSupplierin interfaceSupportsRowPosition
-
createStructReader
protected ValueReader<?> createStructReader(Types.StructType struct, List<ValueReader<?>> fields, Map<Integer, ?> idToConstant)
-