public class VectorizedRowBatch extends Object implements org.apache.hadoop.io.Writable, MutableFilterContext
| Modifier and Type | Field and Description |
|---|---|
ColumnVector[] |
cols |
static int |
DEFAULT_BYTES |
static int |
DEFAULT_SIZE |
boolean |
endOfFile |
int |
numCols |
int[] |
projectedColumns |
int |
projectionSize |
int[] |
selected |
boolean |
selectedInUse |
int |
size |
| Constructor and Description |
|---|
VectorizedRowBatch(int numCols)
Return a batch with the specified number of columns.
|
VectorizedRowBatch(int numCols,
int size)
Return a batch with the specified number of columns and rows.
|
| Modifier and Type | Method and Description |
|---|---|
long |
count()
Return count of qualifying rows.
|
void |
ensureSize(int rows)
Set the maximum number of rows in the batch.
|
int |
getDataColumnCount() |
int |
getMaxSize()
Returns the maximum size of the batch (number of rows it can hold)
|
int |
getPartitionColumnCount() |
int[] |
getSelected()
Return an int array with the rows that pass the filter.
|
int |
getSelectedSize()
Return the number of rows that pass the filter.
|
boolean |
isSelectedInUse()
Is the filter applied?
|
void |
readFields(DataInput arg0) |
void |
reset()
Resets the row batch to default state
- sets selectedInUse to false
- sets size to 0
- sets endOfFile to false
- resets each column
- inits each column
|
void |
setFilterContext(boolean isSelectedInUse,
int[] selected,
int selectedSize)
Set context with the given values by reference.
|
void |
setPartitionInfo(int dataColumnCount,
int partitionColumnCount) |
void |
setSelected(int[] selectedArray)
Set the array of the rows that pass the filter by reference.
|
void |
setSelectedInUse(boolean selectedInUse)
Set the selectedInUse boolean showing if the filter is applied.
|
void |
setSelectedSize(int selectedSize)
Set the number of the rows that pass the filter.
|
String |
stringify(String prefix) |
String |
stringifyColumn(int columnNum) |
String |
toString() |
int[] |
updateSelected(int minCapacity)
Get an array for selected that is expected to be modified.
|
boolean |
validateSelected()
Validate method checking if existing selected array contains accepted values.
|
void |
write(DataOutput arg0) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitimmutablepublic int numCols
public ColumnVector[] cols
public int size
public int[] selected
public int[] projectedColumns
public int projectionSize
public boolean selectedInUse
public boolean endOfFile
public static final int DEFAULT_SIZE
public static final int DEFAULT_BYTES
public VectorizedRowBatch(int numCols)
numCols - the number of columns to include in the batchpublic VectorizedRowBatch(int numCols,
int size)
numCols - the number of columns to include in the batchsize - the number of rows to include in the batchpublic void setPartitionInfo(int dataColumnCount,
int partitionColumnCount)
public int getDataColumnCount()
public int getPartitionColumnCount()
public int getMaxSize()
public long count()
public String stringifyColumn(int columnNum)
public void readFields(DataInput arg0) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput arg0) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic void reset()
reset in interface FilterContextpublic void ensureSize(int rows)
public boolean isSelectedInUse()
FilterContextisSelectedInUse in interface FilterContextpublic int[] getSelected()
FilterContextgetSelected in interface FilterContextpublic int getSelectedSize()
FilterContextgetSelectedSize in interface FilterContextpublic void setFilterContext(boolean isSelectedInUse,
int[] selected,
int selectedSize)
MutableFilterContextsetFilterContext in interface MutableFilterContextisSelectedInUse - if the filter is appliedselected - an array of the selected rowsselectedSize - the number of the selected rowspublic boolean validateSelected()
MutableFilterContextvalidateSelected in interface MutableFilterContextpublic int[] updateSelected(int minCapacity)
MutableFilterContextupdateSelected in interface MutableFilterContextpublic void setSelectedInUse(boolean selectedInUse)
MutableFilterContextsetSelectedInUse in interface MutableFilterContextpublic void setSelected(int[] selectedArray)
MutableFilterContextsetSelected in interface MutableFilterContextpublic void setSelectedSize(int selectedSize)
MutableFilterContextsetSelectedSize in interface MutableFilterContextCopyright © 2020 The Apache Software Foundation. All rights reserved.