public abstract class AbstractWritableVector extends Object implements WritableColumnVector, Serializable
ColumnVector
s, including NULL information and
dictionary. NOTE: if there are some nulls, must set noNulls
to false.Modifier and Type | Field and Description |
---|---|
protected int |
capacity |
protected Dictionary |
dictionary
The Dictionary for this column.
|
protected int |
elementsAppended
Current write cursor (row index) when appending data.
|
protected boolean |
isAllNull |
protected boolean |
noNulls |
Constructor and Description |
---|
AbstractWritableVector(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
addElementsAppended(int num)
Increment number of elements appended by 'num'.
|
int |
getCapacity() |
int |
getElementsAppended() |
boolean |
hasDictionary()
Returns true if this column has a dictionary.
|
boolean |
isAllNull()
Check if all values are null.
|
void |
reserve(int requiredCapacity) |
protected abstract void |
reserveInternal(int newCapacity) |
void |
reset()
Resets the column to default state.
|
void |
setAllNull()
Set all values to null.
|
void |
setDictionary(Dictionary dictionary)
Update the dictionary.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fillWithNulls, getDictionaryIds, reserveAdditional, reserveDictionaryIds, setNullAt, setNulls
getChildren, isNullAt
protected boolean noNulls
protected boolean isAllNull
protected int elementsAppended
protected int capacity
protected Dictionary dictionary
public void setDictionary(Dictionary dictionary)
setDictionary
in interface WritableColumnVector
public boolean hasDictionary()
hasDictionary
in interface WritableColumnVector
public void setAllNull()
WritableColumnVector
setAllNull
in interface WritableColumnVector
public boolean isAllNull()
WritableColumnVector
isAllNull
in interface WritableColumnVector
public int getElementsAppended()
getElementsAppended
in interface WritableColumnVector
public final void addElementsAppended(int num)
addElementsAppended
in interface WritableColumnVector
public int getCapacity()
getCapacity
in interface ColumnVector
public void reset()
WritableColumnVector
reset
in interface WritableColumnVector
public void reserve(int requiredCapacity)
reserve
in interface WritableColumnVector
protected abstract void reserveInternal(int newCapacity)
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.