public Mapping getMapping() {
    ArrayList<Integer> orderedColumns = new ArrayList<Integer>();
    ArrayList<Integer> valueColumns = new ArrayList<Integer>();
    ArrayList<TypeInfo> typeInfos = new ArrayList<TypeInfo>();
    for (Map.Entry<Integer, Value> entry : orderedTreeMap.entrySet()) {
      orderedColumns.add(entry.getKey());
      Value value = entry.getValue();
      valueColumns.add(value.valueColumn);
      typeInfos.add(value.typeInfo);
    }
    return new Mapping(
            ArrayUtils.toPrimitive(orderedColumns.toArray(new Integer[0])),
            ArrayUtils.toPrimitive(valueColumns.toArray(new Integer[0])),
            typeInfos.toArray(new TypeInfo[0]));
  }
This class collects column information for mapping vector columns, including the hive type name.

The column information are kept ordered by a specified column.

Call getMapping to collects the results into convenient arrays.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorColumnOrderedMap.java