public static StructObjectInspector getVCSObjectInspector(List<VirtualColumn> vcs) {
    List<String> names = new ArrayList<String>(vcs.size());
    List<ObjectInspector> inspectors = new ArrayList<ObjectInspector>(vcs.size());
    for (VirtualColumn vc : vcs) {
      names.add(vc.getName());
      inspectors.add(vc.oi);
    }
    return ObjectInspectorFactory.getStandardStructObjectInspector(names, inspectors);
  }
GROUPINGID is used with GROUP BY GROUPINGS SETS, ROLLUP and CUBE.
It composes a bit vector with the "0" and "1" values for every
column which is GROUP BY section. "1" is for a row in the result
set if that column has been aggregated in that row. Otherwise the
value is "0".  Returns the decimal representation of the bit vector.
ql/src/java/org/apache/hadoop/hive/ql/metadata/VirtualColumn.java