org.apache.hadoop.hive.ql.exec
Class GroupByOperator
java.lang.Object
org.apache.hadoop.hive.ql.exec.Operator<groupByDesc>
org.apache.hadoop.hive.ql.exec.GroupByOperator
- All Implemented Interfaces:
- Serializable, Node
public class GroupByOperator
- extends Operator<groupByDesc>
- implements Serializable
GroupBy operator implementation.
- See Also:
- Serialized Form
Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator |
alias, childOperators, conf, done, gWork, id, joinAlias, out, parentOperators, reporter, statsMap |
Methods inherited from class org.apache.hadoop.hive.ql.exec.Operator |
dump, endGroup, forward, getChildOperators, getChildren, getConf, getDone, getParentOperators, getSchema, getStats, jobClose, logStats, preorderMap, resetStats, setAlias, setChildOperators, setConf, setDone, setId, setJoinAlias, setMapredWork, setOutputCollector, setParentOperators, setSchema, startGroup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keyFields
protected transient ExprNodeEvaluator[] keyFields
aggregationParameterFields
protected transient ExprNodeEvaluator[][] aggregationParameterFields
aggregationIsDistinct
protected transient boolean[] aggregationIsDistinct
aggregationsAggregateMethods
protected transient Method[] aggregationsAggregateMethods
aggregationsEvaluateMethods
protected transient Method[] aggregationsEvaluateMethods
objectInspectors
protected transient ArrayList<ObjectInspector> objectInspectors
outputObjectInspector
protected transient ObjectInspector outputObjectInspector
currentKeys
protected transient ArrayList<Object> currentKeys
aggregations
protected transient UDAFEvaluator[] aggregations
aggregationsParametersLastInvoke
protected transient Object[][] aggregationsParametersLastInvoke
hashAggregations
protected transient HashMap<ArrayList<Object>,UDAFEvaluator[]> hashAggregations
GroupByOperator
public GroupByOperator()
initialize
public void initialize(org.apache.hadoop.conf.Configuration hconf,
org.apache.hadoop.mapred.Reporter reporter)
throws HiveException
- Overrides:
initialize
in class Operator<groupByDesc>
- Throws:
HiveException
newAggregations
protected UDAFEvaluator[] newAggregations()
throws HiveException
- Throws:
HiveException
updateAggregations
protected void updateAggregations(UDAFEvaluator[] aggs,
Object row,
ObjectInspector rowInspector,
boolean hashAggr,
boolean newEntry,
Object[][] lastInvoke)
throws HiveException
- Throws:
HiveException
process
public void process(Object row,
ObjectInspector rowInspector)
throws HiveException
- Specified by:
process
in class Operator<groupByDesc>
- Throws:
HiveException
forward
protected void forward(ArrayList<Object> keys,
UDAFEvaluator[] aggs)
throws HiveException
- Forward a record of keys and aggregation results.
- Parameters:
keys
- The keys in the record
- Throws:
HiveException
close
public void close(boolean abort)
throws HiveException
- We need to forward all the aggregations to children.
- Overrides:
close
in class Operator<groupByDesc>
- Throws:
HiveException
genColLists
public List<String> genColLists(HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx)
getName
public String getName()
- Description copied from class:
Operator
- Implements the getName function for the Node Interface.
- Specified by:
getName
in interface Node
- Overrides:
getName
in class Operator<groupByDesc>
- Returns:
- the name of the operator
Copyright © 2009 The Apache Software Foundation