presto-main/src/main/java/io/prestosql/GroupByHashPageIndexer.java/GroupByHashPageIndexer/getMaxIndex
class GroupByHashPageIndexer:    @Override
    public int getMaxIndex()
    {
        return hash.getGroupCount() - 1;
    }