org.apache.hadoop.hive.ql.optimizer.physical
Class BucketingSortingOpProcFactory.GroupByInferrer

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.physical.BucketingSortingOpProcFactory.DefaultInferrer
      extended by org.apache.hadoop.hive.ql.optimizer.physical.BucketingSortingOpProcFactory.GroupByInferrer
All Implemented Interfaces:
NodeProcessor
Direct Known Subclasses:
BucketingSortingOpProcFactory.MultiGroupByInferrer
Enclosing class:
BucketingSortingOpProcFactory

public static class BucketingSortingOpProcFactory.GroupByInferrer
extends BucketingSortingOpProcFactory.DefaultInferrer
implements NodeProcessor

Processor for GroupBy operator. This handles the standard use of a group by operator, the tree should look like ReduceSinkOperator --- GroupByOperator It is up to the caller to guarantee the tree matches this pattern.


Constructor Summary
BucketingSortingOpProcFactory.GroupByInferrer()
           
 
Method Summary
 Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs)
          Generic process for all ops that don't have specific implementations.
protected  Object processGroupBy(Operator<? extends OperatorDesc> parent, GroupByOperator gop, BucketingSortingCtx bctx)
          Process a GroupByOperator to determine which if any columns the output is bucketed and sorted by, assumes the columns output by the parent which are bucketed and sorted have already been determined.
protected  void processGroupByReduceSink(ReduceSinkOperator rop, GroupByOperator gop, BucketingSortingCtx bctx)
          Process the ReduceSinkOperator preceding a GroupByOperator to determine which columns are bucketed and sorted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BucketingSortingOpProcFactory.GroupByInferrer

public BucketingSortingOpProcFactory.GroupByInferrer()
Method Detail

process

public Object process(Node nd,
                      Stack<Node> stack,
                      NodeProcessorCtx procCtx,
                      Object... nodeOutputs)
               throws SemanticException
Description copied from interface: NodeProcessor
Generic process for all ops that don't have specific implementations.

Specified by:
process in interface NodeProcessor
Overrides:
process in class BucketingSortingOpProcFactory.DefaultInferrer
Parameters:
nd - operator to process
procCtx - operator processor context
nodeOutputs - A variable argument list of outputs from other nodes in the walk
Returns:
Object to be returned by the process call
Throws:
SemanticException

processGroupByReduceSink

protected void processGroupByReduceSink(ReduceSinkOperator rop,
                                        GroupByOperator gop,
                                        BucketingSortingCtx bctx)
Process the ReduceSinkOperator preceding a GroupByOperator to determine which columns are bucketed and sorted.

Parameters:
rop -
gop -
bctx -

processGroupBy

protected Object processGroupBy(Operator<? extends OperatorDesc> parent,
                                GroupByOperator gop,
                                BucketingSortingCtx bctx)
Process a GroupByOperator to determine which if any columns the output is bucketed and sorted by, assumes the columns output by the parent which are bucketed and sorted have already been determined.

Parameters:
parent -
gop -
bctx -
Returns:


Copyright © 2012 The Apache Software Foundation