presto-main/src/main/java/io/prestosql/operator/BigintGroupByHash.java/BigintGroupByHash/addNewGroup
class BigintGroupByHash:    private int addNewGroup(long hashPosition, long value)
    {
        // record group id in hash
        int groupId = nextGroupId++;

        values.set(hashPosition, value);
        valuesByGroupId.set(groupId, value);
        groupIds.set(hashPosition, groupId);

        // increase capacity, if necessary
        if (needRehash()) {
            tryRehash();
        }
        return groupId;
    }