public class DataReader<T> extends java.lang.Object implements org.apache.avro.io.DatumReader<T>, SupportsRowPosition
Modifier | Constructor and Description |
---|---|
protected |
DataReader(Schema expectedSchema,
org.apache.avro.Schema readSchema,
java.util.Map<java.lang.Integer,?> idToConstant) |
Modifier and Type | Method and 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) |
protected DataReader(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> idToConstant)
public static <D> DataReader<D> create(Schema expectedSchema, org.apache.avro.Schema readSchema)
public static <D> DataReader<D> create(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> idToConstant)
public void setSchema(org.apache.avro.Schema newFileSchema)
setSchema
in interface org.apache.avro.io.DatumReader<T>
public T read(T reuse, org.apache.avro.io.Decoder decoder) throws java.io.IOException
read
in interface org.apache.avro.io.DatumReader<T>
java.io.IOException
public void setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
setRowPositionSupplier
in interface SupportsRowPosition
protected ValueReader<?> createStructReader(Types.StructType struct, java.util.List<ValueReader<?>> fields, java.util.Map<java.lang.Integer,?> idToConstant)