public static Pair<List<ReduceSinkOperator>, Map<Byte, List<ExprNodeDesc>>> getKeys(
          boolean leftInputJoin, String[] baseSrc, JoinOperator op) {

    // Walk over all the sources (which are guaranteed to be reduce sink
    // operators).
    // The join outputs a concatenation of all the inputs.
    List<ReduceSinkOperator> oldReduceSinkParentOps =
        new ArrayList<ReduceSinkOperator>(op.getNumParent());
    if (leftInputJoin) {
      // assert mapJoinPos == 0;
      Operator<? extends OperatorDesc> parentOp = op.getParentOperators().get(0);
      assert parentOp.getParentOperators().size() == 1;
      oldReduceSinkParentOps.add((ReduceSinkOperator) parentOp);
    }

    byte pos = 0;
    for (String src : baseSrc) {
      if (src != null) {
        Operator<? extends OperatorDesc> parentOp = op.getParentOperators().get(pos);
        assert parentOp.getParentOperators().size() == 1;
        oldReduceSinkParentOps.add((ReduceSinkOperator) parentOp);
      }
      pos++;
    }

    // get the join keys from old parent ReduceSink operators
    Map<Byte, List<ExprNodeDesc>> keyExprMap = new HashMap<Byte, List<ExprNodeDesc>>();

    for (pos = 0; pos < op.getParentOperators().size(); pos++) {
      ReduceSinkOperator inputRS = oldReduceSinkParentOps.get(pos);
      List<ExprNodeDesc> keyCols = inputRS.getConf().getKeyCols();
      keyExprMap.put(pos, keyCols);
    }

    return Pair.of(oldReduceSinkParentOps, keyExprMap);
  }
@param listRejectedMapJoins
         the listRejectedMapJoins to set
ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java