@Override
    public String toString() {
        return root == null ? "(empty)" : root.toString();
    }
Creates a new grouping request and adds it to the query.getSelect().getGrouping() list

@param query the query to attach the request to.
@return The created request.
container-search/src/main/java/com/yahoo/search/grouping/GroupingRequest.java