@Override
    public boolean equals(Object obj) {
        if (!super.equals(obj)) {
            return false;
        }
        Grouping rhs = (Grouping)obj;
        if (id != rhs.id) {
            return false;
        }
        if (valid != rhs.valid) {
            return false;
        }
        if (all != rhs.all) {
            return false;
        }
        if (topN != rhs.topN) {
            return false;
        }
        if (firstLevel != rhs.firstLevel) {
            return false;
        }
        if (lastLevel != rhs.lastLevel) {
            return false;
        }
        if (!groupingLevels.equals(rhs.groupingLevels)) {
            return false;
        }
        if (!root.equals(rhs.root)) {
            return false;
        }
        return true;
    }
Returns whether ordering will need results collected in children.
In that case we will probably just do a single pass.
searchlib/src/main/java/com/yahoo/searchlib/aggregation/Grouping.java