presto-main/src/main/java/io/prestosql/sql/planner/plan/GroupIdNode.java/GroupIdNode/getCommonGroupingColumns
class GroupIdNode:    public Set<Symbol> getCommonGroupingColumns()
    {
        Set<Symbol> intersection = new HashSet<>(groupingSets.get(0));
        for (int i = 1; i < groupingSets.size(); i++) {
            intersection.retainAll(groupingSets.get(i));
        }
        return ImmutableSet.copyOf(intersection);
    }