public class AvroUnionsConsumer extends BaseAvroConsumer<UnionVector>
UnionVector.currentIndex, vector| Constructor and Description |
|---|
AvroUnionsConsumer(UnionVector vector,
Consumer[] delegates,
Types.MinorType[] types)
Instantiate an AvroUnionConsumer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this consumer when occurs exception to avoid potential leak.
|
void |
consume(org.apache.avro.io.Decoder decoder)
Consume a specific type value from avro decoder and write it to vector.
|
boolean |
resetValueVector(UnionVector vector)
Reset the vector within consumer for partial read purpose.
|
addNull, getVector, setPositionpublic AvroUnionsConsumer(UnionVector vector, Consumer[] delegates, Types.MinorType[] types)
public void consume(org.apache.avro.io.Decoder decoder)
throws IOException
Consumerdecoder - avro decoder to read dataIOException - on errorpublic void close()
throws Exception
Consumerclose in interface AutoCloseableclose in interface Consumer<UnionVector>close in class BaseAvroConsumer<UnionVector>Exceptionpublic boolean resetValueVector(UnionVector vector)
ConsumerresetValueVector in interface Consumer<UnionVector>resetValueVector in class BaseAvroConsumer<UnionVector>Copyright © 2024 The Apache Software Foundation. All rights reserved.