public class HeapIntVector extends AbstractHeapVector implements WritableIntVector
Modifier and Type | Field and Description |
---|---|
int[] |
vector |
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 |
---|
HeapIntVector(int len)
Don't use this except for testing purposes.
|
Modifier and Type | Method and Description |
---|---|
void |
appendInt(int v) |
void |
appendInts(int count,
int v) |
void |
fill(int value)
Fill the column vector with the provided value.
|
int |
getInt(int i) |
void |
reset()
Resets the column to default state.
|
void |
setInt(int i,
int value)
Set int at rowId with the provided value.
|
void |
setInts(int rowId,
int count,
int value)
Sets value to [rowId, rowId + count) by the value, this is data that repeats continuously.
|
void |
setInts(int rowId,
int count,
int[] src,
int srcIndex)
Sets values from [src[srcIndex], src[srcIndex + count]) to [rowId, rowId + count).
|
void |
setIntsFromBinary(int rowId,
int count,
byte[] src,
int srcIndex)
Set ints from binary, need use UNSAFE to copy.
|
void |
setNullAt(int i)
Set null at rowId.
|
fillWithNulls, getDictionaryIds, isNullAt, reserveDictionaryIds, reserveInternal, 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, setNulls
getCapacity, getChildren, isNullAt
getCapacity
public HeapIntVector(int len)
len
- the number of rowspublic void setNullAt(int i)
WritableColumnVector
setNullAt
in interface WritableColumnVector
setNullAt
in class AbstractHeapVector
public int getInt(int i)
getInt
in interface IntColumnVector
public void setInt(int i, int value)
WritableIntVector
setInt
in interface WritableIntVector
public void setIntsFromBinary(int rowId, int count, byte[] src, int srcIndex)
WritableIntVector
setIntsFromBinary
in interface WritableIntVector
rowId
- set start rowId.count
- count for int, so the bytes size is count * 4.src
- source binary.srcIndex
- source binary index, it is the index for byte index.public void setInts(int rowId, int count, int value)
WritableIntVector
setInts
in interface WritableIntVector
public void setInts(int rowId, int count, int[] src, int srcIndex)
WritableIntVector
setInts
in interface WritableIntVector
public void fill(int value)
WritableIntVector
fill
in interface WritableIntVector
public void appendInt(int v)
appendInt
in interface WritableIntVector
public void appendInts(int count, int v)
appendInts
in interface WritableIntVector
public void reset()
AbstractHeapVector
reset
in interface WritableColumnVector
reset
in class AbstractHeapVector
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.