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:
splitin 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.ReadBuilderSet the projection schema.- Specified by:
projectin interfaceInternalData.ReadBuilder
-
reuseContainers
Description copied from interface:InternalData.ReadBuilderReuse container classes, like structs, lists, and maps.- Specified by:
reuseContainersin interfaceInternalData.ReadBuilder
-
reuseContainers
-
rename
-
setRootType
Description copied from interface:InternalData.ReadBuilderSet a custom class for in-memory objects at the schema root.- Specified by:
setRootTypein interfaceInternalData.ReadBuilder
-
setCustomType
Description copied from interface:InternalData.ReadBuilderSet a custom class for in-memory objects at the given field ID.- Specified by:
setCustomTypein interfaceInternalData.ReadBuilder
-
withNameMapping
-
classLoader
-
build
Description copied from interface:InternalData.ReadBuilderBuild the configured reader.- Specified by:
buildin interfaceInternalData.ReadBuilder
-