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, setPosition
public AvroUnionsConsumer(UnionVector vector, Consumer[] delegates, Types.MinorType[] types)
public void consume(org.apache.avro.io.Decoder decoder) throws IOException
Consumer
decoder
- avro decoder to read dataIOException
- on errorpublic void close() throws Exception
Consumer
close
in interface AutoCloseable
close
in interface Consumer<UnionVector>
close
in class BaseAvroConsumer<UnionVector>
Exception
public boolean resetValueVector(UnionVector vector)
Consumer
resetValueVector
in interface Consumer<UnionVector>
resetValueVector
in class BaseAvroConsumer<UnionVector>
Copyright © 2023 The Apache Software Foundation. All rights reserved.