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
dictionary, noNulls
Constructor and Description |
---|
HeapIntVector(int len)
Don't use this except for testing purposes.
|
Modifier and Type | Method and Description |
---|---|
void |
fill(int value)
Fill the column vector with the provided value.
|
int |
getInt(int i) |
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.
|
fillWithNulls, getDictionaryIds, getLen, isNullAt, reserveDictionaryIds, reset, setNullAt, setNulls
hasDictionary, setDictionary
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fillWithNulls, getDictionaryIds, hasDictionary, reserveDictionaryIds, reset, setDictionary, setNullAt, setNulls
isNullAt
public HeapIntVector(int len)
len
- the number of rowspublic 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
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.