public static void genMapJoinOpAndLocalWork(HiveConf conf, MapredWork newWork,
    JoinOperator op, int mapJoinPos)
      throws SemanticException {
    // generate the map join operator; already checked the map join
    MapJoinOperator newMapJoinOp = new MapJoinProcessor().convertMapJoin(conf, op,
        newWork.getMapWork().isLeftInputJoin(), newWork.getMapWork().getBaseSrc(),
        newWork.getMapWork().getMapAliases(), mapJoinPos, true, false);
    genLocalWorkForMapJoin(newWork, newMapJoinOp, mapJoinPos);
  }
Convert the join to a map-join and also generate any local work needed.

@param newWork MapredWork in which the conversion is to happen
@param op
         The join operator that needs to be converted to map-join
@param mapJoinPos
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java