public String toString() {
      String batchSizeString = "batchSize " + Integer.toString(batchSize);
      if (bitSet != null) {
        long bitMask = bitSet.toLongArray()[0];
        batchSizeString += " repeating 0x" + Long.toHexString(bitMask);
      }
      boolean selectedInUse = (selected != null);
      batchSizeString += " selectedInUse " + selectedInUse;
      if (selectedInUse) {
        batchSizeString += " selected " + Arrays.toString(selected);
      }
      return batchSizeString;
    }
Generate random batch source from a random Object[] row source (VectorRandomRowSource).
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/VectorRandomBatchSource.java