private static byte[] writeToBytesColumnVector(int rowIdx, BytesColumnVector col, int writeSize, int val) {
    col.ensureValPreallocated(writeSize);
    byte[] bytes = col.getValPreallocatedBytes();
    int startIdx = col.getValPreallocatedStart();
    Arrays.fill(bytes, startIdx, startIdx + writeSize, (byte) val);
    col.setValPreallocated(rowIdx, writeSize);
    return bytes;
  }
Make sure that ORC's redact mask won't get into trouble by increasing
the size of the allocation before calling setValPreallocated.
storage-api/src/test/org/apache/hadoop/hive/ql/exec/vector/TestBytesColumnVector.java