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, wait
immutable
public 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.Writable
IOException
public void write(DataOutput arg0) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void reset()
reset
in interface FilterContext
public void ensureSize(int rows)
public boolean isSelectedInUse()
FilterContext
isSelectedInUse
in interface FilterContext
public int[] getSelected()
FilterContext
getSelected
in interface FilterContext
public int getSelectedSize()
FilterContext
getSelectedSize
in interface FilterContext
public void setFilterContext(boolean isSelectedInUse, int[] selected, int selectedSize)
MutableFilterContext
setFilterContext
in interface MutableFilterContext
isSelectedInUse
- if the filter is appliedselected
- an array of the selected rowsselectedSize
- the number of the selected rowspublic boolean validateSelected()
MutableFilterContext
validateSelected
in interface MutableFilterContext
public int[] updateSelected(int minCapacity)
MutableFilterContext
updateSelected
in interface MutableFilterContext
public void setSelectedInUse(boolean selectedInUse)
MutableFilterContext
setSelectedInUse
in interface MutableFilterContext
public void setSelected(int[] selectedArray)
MutableFilterContext
setSelected
in interface MutableFilterContext
public void setSelectedSize(int selectedSize)
MutableFilterContext
setSelectedSize
in interface MutableFilterContext
Copyright © 2021 The Apache Software Foundation. All rights reserved.