@Internal 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
dictionary, noNulls
Constructor and Description |
---|
HeapBytesVector(int size)
Don't call this constructor except for testing purposes.
|
Modifier and Type | Method and Description |
---|---|
void |
appendBytes(int elementNum,
byte[] sourceBuf,
int start,
int length)
Append byte[] at rowId with the provided value.
|
void |
fill(byte[] value)
Fill the column vector with the provided value.
|
BytesColumnVector.Bytes |
getBytes(int i) |
void |
reset()
Resets the column to default state.
|
fillWithNulls, getDictionaryIds, getLen, isNullAt, reserveDictionaryIds, setNullAt, setNulls
hasDictionary, setDictionary
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fillWithNulls, getDictionaryIds, hasDictionary, reserveDictionaryIds, setDictionary, setNullAt, setNulls
isNullAt
public int[] start
public int[] length
public byte[] buffer
public HeapBytesVector(int size)
size
- number of elements in the column vectorpublic void reset()
AbstractHeapVector
reset
in interface WritableColumnVector
reset
in class AbstractHeapVector
public void appendBytes(int elementNum, byte[] sourceBuf, int start, int length)
WritableBytesVector
appendBytes
in interface WritableBytesVector
public void fill(byte[] value)
WritableBytesVector
fill
in interface WritableBytesVector
public BytesColumnVector.Bytes getBytes(int i)
getBytes
in interface BytesColumnVector
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.