private String getRowDisplayString(Object row) {
    StringBuilder sb = new StringBuilder();
    if (row instanceof List) {
      List<Object> list = (List) row;
      final int size = list.size();
      boolean isFirst = true;
      for (int i = 0; i < size; i++) {
        if (isFirst) {
          isFirst = false;
        } else {
          sb.append(", ");
        }
        Object object = list.get(i);
        sb.append(getObjectDisplayString(object));
      }
    } else {
      sb.append(getObjectDisplayString(row));
    }
    return sb.toString();
  }
Unit test for the vectorized serialize and deserialize row.
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorSerDeRow.java