org.apache.hadoop.hive.ql.exec
Class CommonJoinOperator<T extends JoinDesc>

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.Operator<T>
      extended by org.apache.hadoop.hive.ql.exec.CommonJoinOperator<T>
All Implemented Interfaces:
Serializable, Cloneable, Node
Direct Known Subclasses:
AbstractMapJoinOperator, JoinOperator

public abstract class CommonJoinOperator<T extends JoinDesc>
extends Operator<T>
implements Serializable

Join operator implementation.

See Also:
Serialized Form

Nested Class Summary
static class CommonJoinOperator.IntermediateObject
          IntermediateObject.
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator
Operator.OperatorFunc, Operator.ProgressCounter, Operator.State
 
Field Summary
protected  Byte alias
           
protected  JoinCondDesc[] condn
           
protected  int countAfterReport
           
protected  Object[] dummyObj
           
protected  RowContainer<ArrayList<Object>>[] dummyObjVectors
           
protected  int[][] filterMap
           
protected  int heartbeatInterval
           
protected  Map<Byte,List<ObjectInspector>> joinFilterObjectInspectors
          The ObjectInspectors for join filters.
protected  Map<Byte,List<ExprNodeEvaluator>> joinFilters
          The filters for join
protected  Map<Byte,List<ExprNodeEvaluator>> joinValues
          The expressions for join inputs.
protected  Map<Byte,List<ObjectInspector>> joinValuesObjectInspectors
          The ObjectInspectors for the join inputs.
protected  Map<Byte,List<ObjectInspector>> joinValuesStandardObjectInspectors
          The standard ObjectInspectors for the join inputs.
protected static org.apache.commons.logging.Log LOG
           
 boolean noOuterJoin
           
protected static int NOTSKIPBIGTABLE
           
protected  boolean[] nullsafes
           
protected  int numAliases
           
protected  Byte[] order
           
protected  Map<Byte,List<ObjectInspector>> rowContainerStandardObjectInspectors
          The standard ObjectInspectors for the row container.
protected  Map<Byte,TableDesc> spillTableDesc
           
protected  int totalSz
           
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator
beginTime, childOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, counterNames, counterNameToEnum, counters, done, fatalErrorCntr, groupKeyObject, id, inputObjInspectors, inputRows, isLogInfoEnabled, numInputRowsCntr, numOutputRowsCntr, operatorId, out, outputObjInspector, outputRows, parentOperators, reporter, state, statsMap, timeTakenCntr, totalTime
 
Constructor Summary
CommonJoinOperator()
           
CommonJoinOperator(CommonJoinOperator<T> clone)
           
 
Method Summary
protected  void checkAndGenObject()
           
 void closeOp(boolean abort)
          All done.
 void endGroup()
          Forward a record of join results.
protected static
<T extends JoinDesc>
ObjectInspector
getJoinOutputObjectInspector(Byte[] order, Map<Byte,List<ObjectInspector>> aliasToObjectInspectors, T conf)
           
 String getName()
          Implements the getName function for the Node Interface.
protected  int getNextSize(int sz)
           
static String getOperatorName()
           
 Map<Integer,Set<String>> getPosToAliasMap()
           
protected  boolean hasFilter(int alias)
           
protected  void initializeOp(org.apache.hadoop.conf.Configuration hconf)
          Operator specific initialization.
protected  void reportProgress()
           
 void setPosToAliasMap(Map<Integer,Set<String>> posToAliasMap)
           
 void startGroup()
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.Operator
allInitializedParentsAreClosed, areAllParentsInitialized, assignCounterNameToEnum, augmentPlan, checkFatalErrors, cleanUpInputFileChanged, cleanUpInputFileChangedOp, clone, close, columnNamesRowResolvedCanBeObtained, dump, dump, fatalErrorMessage, forward, getAdditionalCounters, getChildOperators, getChildren, getColumnExprMap, getConf, getCounterNames, getCounterNameToEnum, getCounters, getDone, getExecContext, getGroupKeyObject, getIdentifier, getInputObjInspectors, getOperatorId, getParentOperators, getSchema, getStats, getType, getWrappedCounterName, incrCounter, initEvaluators, initEvaluators, initEvaluatorsAndReturnStruct, initialize, initializeChildren, initializeCounters, initializeLocalWork, initOperatorId, isUseBucketizedHiveInputFormat, jobClose, jobCloseOp, logStats, passExecContext, preorderMap, process, processOp, removeChild, removeChildAndAdoptItsChildren, removeChildren, removeParent, replaceChild, replaceParent, reset, resetId, resetLastEnumUsed, resetStats, setAlias, setChildOperators, setColumnExprMap, setConf, setCounterNames, setCounterNameToEnum, setDone, setExecContext, setGroupKeyObject, setId, setInputObjInspectors, setOperatorId, setOutputCollector, setParentOperators, setReporter, setSchema, setUseBucketizedHiveInputFormat, supportSkewJoinOptimization, supportUnionRemoveOptimization, updateCounters
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

numAliases

protected transient int numAliases

joinValues

protected transient Map<Byte,List<ExprNodeEvaluator>> joinValues
The expressions for join inputs.


joinFilters

protected transient Map<Byte,List<ExprNodeEvaluator>> joinFilters
The filters for join


filterMap

protected transient int[][] filterMap

joinValuesObjectInspectors

protected transient Map<Byte,List<ObjectInspector>> joinValuesObjectInspectors
The ObjectInspectors for the join inputs.


joinFilterObjectInspectors

protected transient Map<Byte,List<ObjectInspector>> joinFilterObjectInspectors
The ObjectInspectors for join filters.


joinValuesStandardObjectInspectors

protected transient Map<Byte,List<ObjectInspector>> joinValuesStandardObjectInspectors
The standard ObjectInspectors for the join inputs.


rowContainerStandardObjectInspectors

protected transient Map<Byte,List<ObjectInspector>> rowContainerStandardObjectInspectors
The standard ObjectInspectors for the row container.


order

protected transient Byte[] order

condn

protected transient JoinCondDesc[] condn

nullsafes

protected transient boolean[] nullsafes

noOuterJoin

public transient boolean noOuterJoin

dummyObj

protected transient Object[] dummyObj

dummyObjVectors

protected transient RowContainer<ArrayList<Object>>[] dummyObjVectors

totalSz

protected transient int totalSz

spillTableDesc

protected transient Map<Byte,TableDesc> spillTableDesc

countAfterReport

protected transient int countAfterReport

heartbeatInterval

protected transient int heartbeatInterval

NOTSKIPBIGTABLE

protected static final int NOTSKIPBIGTABLE
See Also:
Constant Field Values

alias

protected transient Byte alias
Constructor Detail

CommonJoinOperator

public CommonJoinOperator()

CommonJoinOperator

public CommonJoinOperator(CommonJoinOperator<T> clone)
Method Detail

getJoinOutputObjectInspector

protected static <T extends JoinDesc> ObjectInspector getJoinOutputObjectInspector(Byte[] order,
                                                                                   Map<Byte,List<ObjectInspector>> aliasToObjectInspectors,
                                                                                   T conf)

initializeOp

protected void initializeOp(org.apache.hadoop.conf.Configuration hconf)
                     throws HiveException
Description copied from class: Operator
Operator specific initialization.

Overrides:
initializeOp in class Operator<T extends JoinDesc>
Throws:
HiveException

startGroup

public void startGroup()
                throws HiveException
Overrides:
startGroup in class Operator<T extends JoinDesc>
Throws:
HiveException

getNextSize

protected int getNextSize(int sz)

endGroup

public void endGroup()
              throws HiveException
Forward a record of join results.

Overrides:
endGroup in class Operator<T extends JoinDesc>
Throws:
HiveException

checkAndGenObject

protected void checkAndGenObject()
                          throws HiveException
Throws:
HiveException

hasFilter

protected final boolean hasFilter(int alias)

reportProgress

protected void reportProgress()

closeOp

public void closeOp(boolean abort)
             throws HiveException
All done.

Overrides:
closeOp in class Operator<T extends JoinDesc>
Throws:
HiveException

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<T extends JoinDesc>
Returns:
the name of the operator

getOperatorName

public static String getOperatorName()

getPosToAliasMap

public Map<Integer,Set<String>> getPosToAliasMap()
Returns:
the posToAliasMap

setPosToAliasMap

public void setPosToAliasMap(Map<Integer,Set<String>> posToAliasMap)
Parameters:
posToAliasMap - the posToAliasMap to set


Copyright © 2011 The Apache Software Foundation