public abstract class HashAggTemplate extends Object implements HashAggregator
| Modifier and Type | Class and Description |
|---|---|
class |
HashAggTemplate.BatchHolder |
static class |
HashAggTemplate.Metric |
HashAggregator.AggIterOutcome, HashAggregator.AggOutcome| Modifier and Type | Field and Description |
|---|---|
protected ClassGenerator<?> |
cg |
protected FragmentContext |
context |
protected static org.slf4j.Logger |
logger |
TEMPLATE_DEFINITION| Constructor and Description |
|---|
HashAggTemplate() |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustOutputCount(int outputBatchSize,
int oldRowWidth,
int newRowWidth) |
boolean |
allFlushed() |
boolean |
buildComplete() |
void |
cleanup() |
abstract void |
doSetup(RecordBatch incoming) |
HashAggregator.AggOutcome |
doWork()
Read and process (i.e., insert into the hash table and aggregate) records
from the current batch.
|
boolean |
earlyOutput() |
RecordBatch |
getNewIncoming()
get new incoming: (when reading spilled files like an "incoming")
|
RecordBatch.IterOutcome |
getOutcome() |
int |
getOutputCount() |
abstract int |
getVectorIndex(int recordIndex) |
boolean |
handlingEmit() |
protected HashAggTemplate.BatchHolder |
injectMembers(HashAggTemplate.BatchHolder batchHolder) |
protected HashAggTemplate.BatchHolder |
newBatchHolder(int batchRowCount) |
int |
numGroupedRecords() |
HashAggregator.AggIterOutcome |
outputCurrentBatch()
Output the next batch from partition "nextPartitionToReturn"
|
abstract boolean |
resetValues() |
void |
setup(HashAggregate hashAggrConfig,
HashTableConfig htConfig,
FragmentContext context,
OperatorContext oContext,
RecordBatch incoming,
HashAggBatch outgoing,
LogicalExpression[] valueExprs,
List<TypedFieldId> valueFieldIds,
ClassGenerator<?> cg,
TypedFieldId[] groupByOutFieldIds,
VectorContainer outContainer,
int extraRowBytes) |
String |
toString() |
protected static final org.slf4j.Logger logger
protected FragmentContext context
protected ClassGenerator<?> cg
public void setup(HashAggregate hashAggrConfig, HashTableConfig htConfig, FragmentContext context, OperatorContext oContext, RecordBatch incoming, HashAggBatch outgoing, LogicalExpression[] valueExprs, List<TypedFieldId> valueFieldIds, ClassGenerator<?> cg, TypedFieldId[] groupByOutFieldIds, VectorContainer outContainer, int extraRowBytes)
setup in interface HashAggregatorpublic RecordBatch getNewIncoming()
getNewIncoming in interface HashAggregatorpublic HashAggregator.AggOutcome doWork()
doWork in interface HashAggregatorpublic RecordBatch.IterOutcome getOutcome()
getOutcome in interface HashAggregatorpublic int getOutputCount()
getOutputCount in interface HashAggregatorpublic void adjustOutputCount(int outputBatchSize,
int oldRowWidth,
int newRowWidth)
adjustOutputCount in interface HashAggregatorpublic void cleanup()
cleanup in interface HashAggregatorprotected HashAggTemplate.BatchHolder newBatchHolder(int batchRowCount)
protected HashAggTemplate.BatchHolder injectMembers(HashAggTemplate.BatchHolder batchHolder)
public HashAggregator.AggIterOutcome outputCurrentBatch()
outputCurrentBatch in interface HashAggregatorpublic boolean allFlushed()
allFlushed in interface HashAggregatorpublic boolean buildComplete()
buildComplete in interface HashAggregatorpublic boolean handlingEmit()
handlingEmit in interface HashAggregatorpublic boolean earlyOutput()
earlyOutput in interface HashAggregatorpublic int numGroupedRecords()
public abstract void doSetup(@Named(value="incoming")
RecordBatch incoming)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract int getVectorIndex(@Named(value="recordIndex")
int recordIndex)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract boolean resetValues()
throws SchemaChangeException
SchemaChangeExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.