Package org.apache.iceberg.avro
Class Avro.ReadBuilder
java.lang.Object
org.apache.iceberg.avro.Avro.ReadBuilder
- All Implemented Interfaces:
InternalData.ReadBuilder
- Enclosing class:
- Avro
-
Method Summary
Modifier and TypeMethodDescription<D> AvroIterable<D>
build()
Build the configured reader.classLoader
(ClassLoader classLoader) createReaderFunc
(BiFunction<Schema, org.apache.avro.Schema, org.apache.avro.io.DatumReader<?>> readerFunction) createReaderFunc
(Function<org.apache.avro.Schema, org.apache.avro.io.DatumReader<?>> readerFunction) createResolvingReader
(Function<Schema, org.apache.avro.io.DatumReader<?>> readerFunction) Set the projection schema.Reuse container classes, like structs, lists, and maps.reuseContainers
(boolean shouldReuse) setCustomType
(int fieldId, Class<? extends StructLike> structClass) Set a custom class for in-memory objects at the given field ID.setRootType
(Class<? extends StructLike> rootClass) Set a custom class for in-memory objects at the schema root.split
(long newStart, long newLength) Restricts the read to the given range: [start, end = start + length).withNameMapping
(NameMapping newNameMapping)
-
Method Details
-
createResolvingReader
public Avro.ReadBuilder createResolvingReader(Function<Schema, org.apache.avro.io.DatumReader<?>> readerFunction) -
createReaderFunc
public Avro.ReadBuilder createReaderFunc(Function<org.apache.avro.Schema, org.apache.avro.io.DatumReader<?>> readerFunction) -
createReaderFunc
public Avro.ReadBuilder createReaderFunc(BiFunction<Schema, org.apache.avro.Schema, org.apache.avro.io.DatumReader<?>> readerFunction) -
split
Restricts the read to the given range: [start, end = start + length).- Specified by:
split
in interfaceInternalData.ReadBuilder
- Parameters:
newStart
- the start position for this readnewLength
- the length of the range this read should scan- Returns:
- this builder for method chaining
-
project
Description copied from interface:InternalData.ReadBuilder
Set the projection schema.- Specified by:
project
in interfaceInternalData.ReadBuilder
-
reuseContainers
Description copied from interface:InternalData.ReadBuilder
Reuse container classes, like structs, lists, and maps.- Specified by:
reuseContainers
in interfaceInternalData.ReadBuilder
-
reuseContainers
-
rename
-
setRootType
Description copied from interface:InternalData.ReadBuilder
Set a custom class for in-memory objects at the schema root.- Specified by:
setRootType
in interfaceInternalData.ReadBuilder
-
setCustomType
Description copied from interface:InternalData.ReadBuilder
Set a custom class for in-memory objects at the given field ID.- Specified by:
setCustomType
in interfaceInternalData.ReadBuilder
-
withNameMapping
-
classLoader
-
build
Description copied from interface:InternalData.ReadBuilder
Build the configured reader.- Specified by:
build
in interfaceInternalData.ReadBuilder
-