public static boolean isVirtualColumnBasedOnAlias(ColumnInfo column) {
    // Not using method column.getIsVirtualCol() because partitioning columns
    // are also treated as virtual columns in ColumnInfo.
    if (column.getAlias() != null
        && VirtualColumn.VIRTUAL_COLUMN_NAMES.contains(column.getAlias().toUpperCase())) {
      return true;
    }
    return false;
  }
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