@Override
  public PhysicalContext resolve(PhysicalContext pctx) throws SemanticException {

    // create dispatcher and graph walker
    SemanticDispatcher disp = new LocalMapJoinTaskDispatcher(pctx);
    TaskGraphWalker ogw = new TaskGraphWalker(disp);

    // get all the tasks nodes from root task
    ArrayList<Node> topNodes = new ArrayList<Node>();
    topNodes.addAll(pctx.getRootTasks());

    // begin to walk through the task tree.
    ogw.startWalking(topNodes, null);
    return pctx;
  }
An implementation of PhysicalPlanResolver. It iterator each MapRedTask to see whether the task
has a local map work if it has, it will move the local work to a new local map join task. Then it
will make this new generated task depends on current task's parent task and make current task
depends on this new generated task.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MapJoinResolver.java