public abstract class AbstractMapVector extends AbstractContainerVector
ValueVector.Accessor, ValueVector.Mutatorallocator, callBack, name| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMapVector(String name,
BufferAllocator allocator,
CallBack callBack) |
| Modifier and Type | Method and Description |
|---|---|
protected ValueVector |
add(String name,
Types.MinorType minorType,
int... precisionScale) |
<T extends FieldVector> |
addOrGet(String name,
Types.MinorType minorType,
Class<T> clazz,
int... precisionScale)
Adds a new field with the given parameters or replaces the existing one and consequently returns the resultant
ValueVector. |
boolean |
allocateNewSafe()
Allocates new buffers.
|
void |
close()
Clears out all underlying child vectors.
|
ArrowBuf[] |
getBuffers(boolean clear)
Return the underlying buffers associated with this vector.
|
int |
getBufferSize()
Returns the number of bytes that is used by this vector instance.
|
<T extends FieldVector> |
getChild(String name,
Class<T> clazz)
Returns a
ValueVector instance of subtype of |
ValueVector |
getChildByOrdinal(int id)
Returns a
ValueVector corresponding to the given ordinal identifier. |
protected List<String> |
getChildFieldNames() |
protected List<FieldVector> |
getChildren()
Returns a sequence of underlying child vectors.
|
VectorWithOrdinal |
getChildVectorWithOrdinal(String name)
Returns a vector with its corresponding ordinal mapping if field exists or null.
|
List<ValueVector> |
getPrimitiveVectors()
Returns a list of scalar child vectors recursing the entire vector hierarchy.
|
Iterator<ValueVector> |
iterator() |
protected void |
putChild(String name,
FieldVector vector)
Inserts the vector with the given name if it does not exist else replaces it with the new value.
|
protected void |
putVector(String name,
FieldVector vector)
Inserts the input vector into the map if it does not exist, replaces if it exists already
|
int |
size()
Returns the number of underlying child vectors.
|
allocateNew, getAllocator, getChild, supportsDirectRead, typeifyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getAccessor, getBufferSizeFor, getField, getMinorType, getMutator, getReader, getTransferPair, getTransferPair, getValueCapacity, makeTransferPair, setInitialCapacityprotected AbstractMapVector(String name, BufferAllocator allocator, CallBack callBack)
public void close()
AbstractContainerVectorclose in interface Closeableclose in interface AutoCloseableclose in interface ValueVectorclose in class AbstractContainerVectorpublic boolean allocateNewSafe()
ValueVectorpublic <T extends FieldVector> T addOrGet(String name, Types.MinorType minorType, Class<T> clazz, int... precisionScale)
ValueVector.
Execution takes place in the following order:
IllegalStateException
addOrGet in class AbstractContainerVectorT - class type of expected vector typename - the name of the fieldminorType - the minorType for the vectorclazz - class of expected vector typeValueVectorIllegalStateException - raised if there is a hard schema changepublic ValueVector getChildByOrdinal(int id)
ValueVector corresponding to the given ordinal identifier.public <T extends FieldVector> T getChild(String name, Class<T> clazz)
ValueVector instance of subtype of getChild in class AbstractContainerVectorprotected ValueVector add(String name, Types.MinorType minorType, int... precisionScale)
protected void putChild(String name, FieldVector vector)
protected void putVector(String name, FieldVector vector)
name - field namevector - vector to be insertedprotected List<FieldVector> getChildren()
public int size()
size in class AbstractContainerVectorpublic Iterator<ValueVector> iterator()
public List<ValueVector> getPrimitiveVectors()
public VectorWithOrdinal getChildVectorWithOrdinal(String name)
getChildVectorWithOrdinal in class AbstractContainerVectorpublic ArrowBuf[] getBuffers(boolean clear)
ValueVectorclear - Whether to clear vector before returning; the buffers will still be refcounted;
but the returned array will be the only reference to thembuffers that is used by this vector instance.public int getBufferSize()
ValueVectorCopyright © 2016 The Apache Software Foundation. All rights reserved.