Package org.apache.iceberg.avro
Class ValueReaders.StructReader<S>
- java.lang.Object
-
- org.apache.iceberg.avro.ValueReaders.StructReader<S>
-
- All Implemented Interfaces:
SupportsRowPosition
,ValueReader<S>
- Enclosing class:
- ValueReaders
public abstract static class ValueReaders.StructReader<S> extends java.lang.Object implements ValueReader<S>, SupportsRowPosition
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StructReader(java.util.List<ValueReader<?>> readers, org.apache.avro.Schema schema)
protected
StructReader(java.util.List<ValueReader<?>> readers, Types.StructType struct, java.util.Map<java.lang.Integer,?> idToConstant)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Object
get(S struct, int pos)
S
read(org.apache.avro.io.Decoder decoder, java.lang.Object reuse)
ValueReader<?>
reader(int pos)
protected abstract S
reuseOrCreate(java.lang.Object reuse)
protected abstract void
set(S struct, int pos, java.lang.Object value)
void
setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iceberg.avro.ValueReader
skip
-
-
-
-
Constructor Detail
-
StructReader
protected StructReader(java.util.List<ValueReader<?>> readers, org.apache.avro.Schema schema)
-
StructReader
protected StructReader(java.util.List<ValueReader<?>> readers, Types.StructType struct, java.util.Map<java.lang.Integer,?> idToConstant)
-
-
Method Detail
-
setRowPositionSupplier
public void setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
- Specified by:
setRowPositionSupplier
in interfaceSupportsRowPosition
-
reuseOrCreate
protected abstract S reuseOrCreate(java.lang.Object reuse)
-
get
protected abstract java.lang.Object get(S struct, int pos)
-
set
protected abstract void set(S struct, int pos, java.lang.Object value)
-
reader
public ValueReader<?> reader(int pos)
-
read
public S read(org.apache.avro.io.Decoder decoder, java.lang.Object reuse) throws java.io.IOException
- Specified by:
read
in interfaceValueReader<S>
- Throws:
java.io.IOException
-
-