GroupId newGroupId(com.yahoo.searchlib.aggregation.Group execGroup) {
            ResultNode res = execGroup.getId();
            if (res instanceof FloatResultNode) {
                return new DoubleId(res.getFloat());
            } else if (res instanceof IntegerResultNode) {
                return new LongId(res.getInteger());
            } else if (res instanceof BoolResultNode) {
                return new BoolId(((BoolResultNode)res).getValue());
            } else if (res instanceof NullResultNode) {
                return new NullId();
            } else if (res instanceof RawResultNode) {
                return new RawId(res.getRaw());
            } else if (res instanceof StringResultNode) {
                return new StringId(res.getString());
            } else if (res instanceof FloatBucketResultNode bucketId) {
                return new DoubleBucketId(bucketId.getFrom(), bucketId.getTo());
            } else if (res instanceof IntegerBucketResultNode bucketId) {
                return new LongBucketId(bucketId.getFrom(), bucketId.getTo());
            } else if (res instanceof StringBucketResultNode bucketId) {
                return new StringBucketId(bucketId.getFrom(), bucketId.getTo());
            } else if (res instanceof RawBucketResultNode bucketId) {
                return new RawBucketId(bucketId.getFrom(), bucketId.getTo());
            } else {
                throw new UnsupportedOperationException(res.getClass().getName());
            }
        }
Constructs the grouping result tree that corresponds to the parameters given to this builder. This method might
fail due to unsupported constructs in the results, in which case an exception is thrown.

@throws IllegalInputException Thrown if the grouping result contains unsupported constructs.
container-search/src/main/java/com/yahoo/search/grouping/vespa/ResultBuilder.java