presto-main/src/main/java/io/prestosql/operator/PagesIndex.java/PagesIndex/getPages
class PagesIndex:    public Iterator<Page> getPages()
    {
        return new AbstractIterator<Page>()
        {
            private int pageCounter;

            @Override
            protected Page computeNext()
            {
                if (pageCounter == channels[0].size()) {
                    return endOfData();
                }

                Block[] blocks = Stream.of(channels)
                        .map(channel -> channel.get(pageCounter))
                        .toArray(Block[]::new);
                pageCounter++;
                return new Page(blocks);
            }
        };
    }