org.apache.hadoop.hive.ql.exec.vector
Class VectorAggregationBufferBatch

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.vector.VectorAggregationBufferBatch

public class VectorAggregationBufferBatch
extends Object

This maps a batch to the aggregation buffers sets to use for each row (key)


Constructor Summary
VectorAggregationBufferBatch()
           
 
Method Summary
 void compileAggregationBatchInfo(VectorAggregateExpression[] aggregators)
           
 VectorAggregationBufferRow[] getAggregationBuffers()
          the array of aggregation buffers for the current batch.
 int getAggregatorsFixedSize()
          Returns the fixed size consumed by the aggregation buffers
 int getDistinctBufferSetCount()
          number of distinct aggregation buffer sets (ie.
 boolean getHasVariableSize()
          returns True if any of the aggregators has a variable size
 int getVariableSize(int batchSize)
           
 void mapAggregationBufferSet(VectorAggregationBufferRow bufferSet, int row)
          assigns the given aggregation buffer set to a given batch row (by row number).
 void startBatch()
          resets the internal aggregation buffers sets index and increments the versioning used to optimize the selection vector population.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorAggregationBufferBatch

public VectorAggregationBufferBatch()
Method Detail

getHasVariableSize

public boolean getHasVariableSize()
returns True if any of the aggregators has a variable size

Returns:

getAggregatorsFixedSize

public int getAggregatorsFixedSize()
Returns the fixed size consumed by the aggregation buffers

Returns:

getAggregationBuffers

public VectorAggregationBufferRow[] getAggregationBuffers()
the array of aggregation buffers for the current batch. content past the getDistinctBufferSetCount() index is stale from previous batches.

Returns:

getDistinctBufferSetCount

public int getDistinctBufferSetCount()
number of distinct aggregation buffer sets (ie. keys) in the current batch.

Returns:

startBatch

public void startBatch()
resets the internal aggregation buffers sets index and increments the versioning used to optimize the selection vector population.


mapAggregationBufferSet

public void mapAggregationBufferSet(VectorAggregationBufferRow bufferSet,
                                    int row)
assigns the given aggregation buffer set to a given batch row (by row number). populates the selection vector appropriately. This is where the versioning numbers play a role in determining if the index cached on the aggregation buffer set is stale.


compileAggregationBatchInfo

public void compileAggregationBatchInfo(VectorAggregateExpression[] aggregators)

getVariableSize

public int getVariableSize(int batchSize)


Copyright © 2014 The Apache Software Foundation. All rights reserved.