private static void initMapJoinPlan(AbstractMapJoinOperator<? extends MapJoinDesc> op,
        Task<?> currTask,
        GenMRProcContext opProcCtx, boolean local)
        throws SemanticException {

      // The map is overloaded to keep track of mapjoins also
      opProcCtx.getOpTaskMap().put(op, currTask);

      TableScanOperator currTopOp = opProcCtx.getCurrTopOp();
      String currAliasId = opProcCtx.getCurrAliasId();
      GenMapRedUtils.setTaskPlan(currAliasId, currTopOp, currTask, local, opProcCtx);
    }
Initialize the current plan by adding it to root tasks. Since a reduce sink
cannot be present before a mapjoin, and the mapjoin operator is encountered
for the first time, the task corresposding to the mapjoin is added to the
root tasks.

@param op
         the map join operator encountered
@param opProcCtx
         processing context
@param pos
         position of the parent
ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinFactory.java