|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.Operator<GroupByDesc>
org.apache.hadoop.hive.ql.exec.GroupByOperator
public class GroupByOperator
GroupBy operator implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator |
---|
Operator.OperatorFunc, Operator.ProgressCounter, Operator.State |
Field Summary | |
---|---|
protected boolean[] |
aggregationIsDistinct
|
protected ExprNodeEvaluator[][] |
aggregationParameterFields
|
protected ObjectInspector[][] |
aggregationParameterObjectInspectors
|
protected Object[][] |
aggregationParameterObjects
|
protected ObjectInspector[][] |
aggregationParameterStandardObjectInspectors
|
protected GenericUDAFEvaluator.AggregationBuffer[] |
aggregations
|
protected Object[][] |
aggregationsParametersLastInvoke
|
protected ObjectInspector[] |
currentKeyObjectInspectors
|
protected ArrayList<Object> |
currentKeys
|
protected HashMap<org.apache.hadoop.hive.ql.exec.GroupByOperator.KeyWrapper,GenericUDAFEvaluator.AggregationBuffer[]> |
hashAggregations
|
protected ExprNodeEvaluator[] |
keyFields
|
protected ObjectInspector[] |
keyObjectInspectors
|
protected Object[] |
keyObjects
|
protected HashSet<ArrayList<Object>> |
keysCurrentGroup
|
protected ArrayList<Object> |
newKeys
|
protected ArrayList<ObjectInspector> |
objectInspectors
|
Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator |
---|
alias, beginTime, childOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, counterNames, counterNameToEnum, counters, done, fatalErrorCntr, groupKeyObject, id, inputObjInspectors, inputRows, numInputRowsCntr, numOutputRowsCntr, operatorId, out, outputObjInspector, outputRows, parentOperators, reporter, state, statsMap, timeTakenCntr, totalTime |
Constructor Summary | |
---|---|
GroupByOperator()
|
Method Summary | |
---|---|
void |
closeOp(boolean abort)
We need to forward all the aggregations to children. |
void |
endGroup()
|
protected void |
forward(ArrayList<Object> keys,
GenericUDAFEvaluator.AggregationBuffer[] aggs)
Forward a record of keys and aggregation results. |
List<String> |
genColLists(HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx)
|
String |
getName()
Implements the getName function for the Node Interface. |
int |
getType()
Should be overridden to return the type of the specific operator among the types in OperatorType. |
protected void |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization. |
protected GenericUDAFEvaluator.AggregationBuffer[] |
newAggregations()
|
void |
processOp(Object row,
int tag)
Process the row. |
protected void |
resetAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs)
|
void |
startGroup()
|
protected void |
updateAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs,
Object row,
ObjectInspector rowInspector,
boolean hashAggr,
boolean newEntryForHashAggr,
Object[][] lastInvoke)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient ExprNodeEvaluator[] keyFields
protected transient ObjectInspector[] keyObjectInspectors
protected transient Object[] keyObjects
protected transient ExprNodeEvaluator[][] aggregationParameterFields
protected transient ObjectInspector[][] aggregationParameterObjectInspectors
protected transient ObjectInspector[][] aggregationParameterStandardObjectInspectors
protected transient Object[][] aggregationParameterObjects
protected transient boolean[] aggregationIsDistinct
protected transient ArrayList<ObjectInspector> objectInspectors
protected transient ArrayList<Object> currentKeys
protected transient ArrayList<Object> newKeys
protected transient GenericUDAFEvaluator.AggregationBuffer[] aggregations
protected transient Object[][] aggregationsParametersLastInvoke
protected transient HashMap<org.apache.hadoop.hive.ql.exec.GroupByOperator.KeyWrapper,GenericUDAFEvaluator.AggregationBuffer[]> hashAggregations
protected transient HashSet<ArrayList<Object>> keysCurrentGroup
protected transient ObjectInspector[] currentKeyObjectInspectors
Constructor Detail |
---|
public GroupByOperator()
Method Detail |
---|
protected void initializeOp(org.apache.hadoop.conf.Configuration hconf) throws HiveException
Operator
initializeOp
in class Operator<GroupByDesc>
HiveException
protected GenericUDAFEvaluator.AggregationBuffer[] newAggregations() throws HiveException
HiveException
protected void resetAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs) throws HiveException
HiveException
protected void updateAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs, Object row, ObjectInspector rowInspector, boolean hashAggr, boolean newEntryForHashAggr, Object[][] lastInvoke) throws HiveException
HiveException
public void startGroup() throws HiveException
startGroup
in class Operator<GroupByDesc>
HiveException
public void endGroup() throws HiveException
endGroup
in class Operator<GroupByDesc>
HiveException
public void processOp(Object row, int tag) throws HiveException
Operator
processOp
in class Operator<GroupByDesc>
row
- The object representing the row.tag
- The tag of the row usually means which parent this row comes from.
Rows with the same tag should have exactly the same rowInspector
all the time.
HiveException
protected void forward(ArrayList<Object> keys, GenericUDAFEvaluator.AggregationBuffer[] aggs) throws HiveException
keys
- The keys in the record
HiveException
public void closeOp(boolean abort) throws HiveException
closeOp
in class Operator<GroupByDesc>
HiveException
public List<String> genColLists(HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx)
public String getName()
Operator
getName
in interface Node
getName
in class Operator<GroupByDesc>
public int getType()
Operator
getType
in class Operator<GroupByDesc>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |