private static void checkParentOperatorType(Operator<? extends OperatorDesc> op)
      throws SemanticException {
    if (!op.opAllowedBeforeMapJoin()) {
      throw new SemanticException(ErrorMsg.OPERATOR_NOT_ALLOWED_WITH_MAPJOIN.getMsg());
    }
    if (op.getParentOperators() != null) {
      for (Operator<? extends OperatorDesc> parentOp : op.getParentOperators()) {
        checkParentOperatorType(parentOp);
      }
    }
  }
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