code: public static List<Object> toGroupKey(long timeStamp, InputRow inputRow)
    {
      final Map<String, Set<String>> dims = new TreeMap<>();
      for (final String dim : inputRow.getDimensions()) {
        final Set<String> dimValues = ImmutableSortedSet.copyOf(inputRow.getDimension(dim));
        if (dimValues.size() > 0) {
          dims.put(dim, dimValues);
        }
      }
      return ImmutableList.of(timeStamp, dims);
    }
docs: @param timeStamp rollup up timestamp to be used to create group key
  @param inputRow  input row
  
  @return groupKey for the given input row