@Override
  public void process(Object[] args) throws HiveException, UDFArgumentException {

    long numRows = ((LongObjectInspector) argOIs.get(0)).get(args[0]);

    for (long n = 0; n < numRows; n++) {
      forward(args);
    }
  }
Takes a row of data and repeats n times.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFReplicateRows.java