public class HeapBytesVector extends AbstractHeapVector implements WritableBytesVector
When setting data by reference, the caller is responsible for allocating the byte arrays used to hold the data. You can also set data by value, as long as you call the initBuffer() method first. You can mix "by value" and "by reference" in the same column vector, though that use is probably not typical.
BytesColumnVector.Bytes
Modifier and Type | Field and Description |
---|---|
byte[] |
buffer
buffer to use when actually copying in data.
|
int[] |
length
The length of each field.
|
int[] |
start
start offset of each field.
|
BYTE_ARRAY_OFFSET, dictionaryIds, DOUBLE_ARRAY_OFFSET, FLOAT_ARRAY_OFFSET, INT_ARRAY_OFFSET, isNull, LITTLE_ENDIAN, LONG_ARRAY_OFFSET, UNSAFE
capacity, dictionary, elementsAppended, isAllNull, noNulls
Constructor and Description |
---|
HeapBytesVector(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
fill(byte[] value)
Fill the column vector with the provided value.
|
BytesColumnVector.Bytes |
getBytes(int i) |
void |
putByteArray(int elementNum,
byte[] sourceBuf,
int start,
int length)
Append byte[] at rowId with the provided value.
|
void |
reset()
Resets the column to default state.
|
fillWithNulls, getDictionaryIds, isNullAt, reserveDictionaryIds, reserveInternal, setNullAt, setNulls
addElementsAppended, getCapacity, getElementsAppended, hasDictionary, isAllNull, reserve, setAllNull, setDictionary
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addElementsAppended, fillWithNulls, getDictionaryIds, getElementsAppended, hasDictionary, isAllNull, reserve, reserveAdditional, reserveDictionaryIds, setAllNull, setDictionary, setNullAt, setNulls
getCapacity, getChildren, isNullAt
getCapacity
public int[] start
public int[] length
public byte[] buffer
public void reset()
AbstractHeapVector
reset
in interface WritableColumnVector
reset
in class AbstractHeapVector
public void putByteArray(int elementNum, byte[] sourceBuf, int start, int length)
WritableBytesVector
putByteArray
in interface WritableBytesVector
public void fill(byte[] value)
WritableBytesVector
fill
in interface WritableBytesVector
public BytesColumnVector.Bytes getBytes(int i)
getBytes
in interface BytesColumnVector
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.