private Output serializeRow(Object[] row, VectorRandomRowSource source,
      SerializeWrite serializeWrite) throws HiveException, IOException {
    Output output = new Output();
    serializeWrite.set(output);
    TypeInfo[] typeInfos = source.typeInfos();

    for (int i = 0; i < typeInfos.length; i++) {
      VectorVerifyFast.serializeWrite(serializeWrite, typeInfos[i], row[i]);
    }
    return output;
  }
Unit test for the vectorized serialize and deserialize row.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSerDeRow.java