public class HeapBytesVector extends AbstractHeapVector implements BytesColumnVector
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.
|
dictionaryIds, isNull
dictionary, noNulls
Constructor and Description |
---|
HeapBytesVector(int size)
Don't call this constructor except for testing purposes.
|
Modifier and Type | Method and Description |
---|---|
BytesColumnVector.Bytes |
getBytes(int i) |
void |
reset()
Resets the column to default state.
|
void |
setVal(int elementNum,
byte[] sourceBuf)
Set a field by actually copying in to a local buffer.
|
void |
setVal(int elementNum,
byte[] sourceBuf,
int start,
int length)
Set a field by actually copying in to a local buffer.
|
getDictionaryIds, isNullAt, reserveDictionaryIds, setNullAt
hasDictionary, setDictionary
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 ColumnVector
reset
in class AbstractHeapVector
public void setVal(int elementNum, byte[] sourceBuf, int start, int length)
elementNum
- index within column vector to setsourceBuf
- container of source datastart
- start byte position within sourcelength
- length of source byte sequencepublic void setVal(int elementNum, byte[] sourceBuf)
elementNum
- index within column vector to setsourceBuf
- container of source datapublic BytesColumnVector.Bytes getBytes(int i)
getBytes
in interface BytesColumnVector
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.