public static VectorRandomBatchSource createInterestingBatches(
      Random random,
      VectorRandomRowSource vectorRandomRowSource,
      Object[][] randomRows,
      VectorRandomBatchParameters vectorRandomBatchParameters)
          throws HiveException {

    VectorAssignRow vectorAssignRow = new VectorAssignRow();
    vectorAssignRow.init(vectorRandomRowSource.typeNames());

    VectorBatchPatterns vectorBatchPatterns =
        chooseBatchPatterns(random, vectorRandomRowSource, randomRows);

    return new VectorRandomBatchSource(
        vectorRandomRowSource, randomRows, vectorBatchPatterns, vectorAssignRow);
  }
Generate random batch source from a random Object[] row source (VectorRandomRowSource).
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/VectorRandomBatchSource.java