presto-main/src/main/java/io/prestosql/operator/NestedLoopJoinOperator.java/NestedLoopJoinOperator/next
class NestedLoopJoinOperator:        @Override
        public Page next()
        {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }

            if (noColumnShortcutResult >= 0) {
                rowIndex = maxRowIndex;
                return new Page(noColumnShortcutResult);
            }

            rowIndex++;

            // Create an array of blocks for all columns in both pages.
            Block[] blocks = new Block[numberOfProbeColumns + numberOfBuildColumns];

            // Make sure we always put the probe data on the left and build data on the right.
            int indexForRleBlocks = buildPageLarger ? 0 : numberOfProbeColumns;
            int indexForPageBlocks = buildPageLarger ? numberOfProbeColumns : 0;

            // For the page with less rows, create RLE blocks and add them to the blocks array
            for (int i = 0; i < smallPage.getChannelCount(); i++) {
                Block block = smallPage.getBlock(i).getSingleValueBlock(rowIndex);
                blocks[indexForRleBlocks] = new RunLengthEncodedBlock(block, largePage.getPositionCount());
                indexForRleBlocks++;
            }

            // Put the page with more rows in the blocks array
            for (int i = 0; i < largePage.getChannelCount(); i++) {
                blocks[indexForPageBlocks + i] = largePage.getBlock(i);
            }

            return new Page(largePage.getPositionCount(), blocks);
        }