public static <T extends OperatorDesc> Operator<T> getAndMakeChild(CompilationOpContext cContext,
      T conf, List<Operator<? extends OperatorDesc>> oplist) {
    Operator<T> ret = get(cContext, (Class<T>) conf.getClass());
    ret.setConf(conf);
    if (oplist.size() == 0) {
      return ret;
    }

    // Add the new operator as child of each of the passed in operators
    for (Operator op : oplist) {
      List<Operator> children = op.getChildOperators();
      children.add(ret);
    }

    // add parents for the newly created operator
    List<Operator<? extends OperatorDesc>> parent =
      new ArrayList<Operator<? extends OperatorDesc>>();
    for (Operator op : oplist) {
      parent.add(op);
    }

    ret.setParentOperators(parent);

    return ret;
  }
Returns an operator given the conf and a list of parent operators.
ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java