public static int checkMapJoin(int mapJoinPos, JoinCondDesc[] condns) {
    Set<Integer> bigTableCandidates =
        MapJoinProcessor.getBigTableCandidates(condns, /* isSupportFullOuter */ true);

    // bigTableCandidates can never be null
    if (!bigTableCandidates.contains(mapJoinPos)) {
      return -1;
    }
    return mapJoinPos;
  }
@param mapJoinPos the position of big table as determined by either hints or auto conversion.
@param condns the join conditions
@return if given mapjoin position is a feasible big table position return same else -1.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java