public class LongGroupByColumnSelectorStrategy extends Object implements GroupByColumnSelectorStrategy
Constructor and Description |
---|
LongGroupByColumnSelectorStrategy() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkRowIndexAndAddValueToGroupingKey(int keyBufferPosition,
Object rowObj,
int rowValIdx,
ByteBuffer keyBuffer)
If rowValIdx is less than the size of rowObj (haven't handled all of the row values):
First, read the value at rowValIdx from a rowObj and write that value to the keyBuffer at keyBufferPosition.
|
int |
getGroupingKeySize()
Return the size, in bytes, of this dimension's values in the grouping key.
|
void |
initColumnValues(ColumnValueSelector selector,
int columnIndex,
Object[] valuess)
Retrieve a row object from the ColumnSelectorPlus and put it in valuess at columnIndex.
|
void |
initGroupingKeyColumnValue(int keyBufferPosition,
int columnIndex,
Object rowObj,
ByteBuffer keyBuffer,
int[] stack)
Read the first value within a row values object (IndexedInts, IndexedLongs, etc.) and write that value
to the keyBuffer at keyBufferPosition.
|
void |
processValueFromGroupingKey(GroupByColumnSelectorPlus selectorPlus,
ByteBuffer key,
Map<String,Object> resultMap)
Read a value from a grouping key and add it to the group by query result map, using the output name specified
in a DimensionSpec.
|
public int getGroupingKeySize()
GroupByColumnSelectorStrategy
getGroupingKeySize
in interface GroupByColumnSelectorStrategy
public void processValueFromGroupingKey(GroupByColumnSelectorPlus selectorPlus, ByteBuffer key, Map<String,Object> resultMap)
GroupByColumnSelectorStrategy
processValueFromGroupingKey
in interface GroupByColumnSelectorStrategy
selectorPlus
- dimension info containing the key offset, value selector, and dimension speckey
- grouping keyresultMap
- result map for the group by query being servedpublic void initColumnValues(ColumnValueSelector selector, int columnIndex, Object[] valuess)
GroupByColumnSelectorStrategy
initColumnValues
in interface GroupByColumnSelectorStrategy
selector
- Value selector for a column.columnIndex
- Index of the column within the row values arrayvaluess
- Row values array, one index per columnpublic void initGroupingKeyColumnValue(int keyBufferPosition, int columnIndex, Object rowObj, ByteBuffer keyBuffer, int[] stack)
GroupByColumnSelectorStrategy
initGroupingKeyColumnValue
in interface GroupByColumnSelectorStrategy
keyBufferPosition
- Starting offset for this column's value within the grouping key.columnIndex
- Index of the column within the row values arrayrowObj
- Row value object for this column (e.g., IndexedInts)keyBuffer
- grouping keystack
- array containing the current within-row value index for each columnpublic boolean checkRowIndexAndAddValueToGroupingKey(int keyBufferPosition, Object rowObj, int rowValIdx, ByteBuffer keyBuffer)
GroupByColumnSelectorStrategy
checkRowIndexAndAddValueToGroupingKey
in interface GroupByColumnSelectorStrategy
keyBufferPosition
- Starting offset for this column's value within the grouping key.rowObj
- Row value object for this column (e.g., IndexedInts)rowValIdx
- Index of the current value being grouped on within the rowkeyBuffer
- grouping keyCopyright © 2011–2017. All rights reserved.