presto-main/src/main/java/io/prestosql/operator/LookupJoinPageBuilder.java/LookupJoinPageBuilder/build
class LookupJoinPageBuilder:    public Page build(JoinProbe probe)
    {
        int[] probeIndices = probeIndexBuilder.toIntArray();
        int length = probeIndices.length;
        verify(buildPageBuilder.getPositionCount() == length);

        int[] probeOutputChannels = probe.getOutputChannels();
        Block[] blocks = new Block[probeOutputChannels.length + buildOutputChannelCount];
        for (int i = 0; i < probeOutputChannels.length; i++) {
            Block probeBlock = probe.getPage().getBlock(probeOutputChannels[i]);
            if (!isSequentialProbeIndices || length == 0) {
                blocks[i] = probeBlock.getPositions(probeIndices, 0, probeIndices.length);
            }
            else if (length == probeBlock.getPositionCount()) {
                // probeIndices are a simple covering of the block
                verify(probeIndices[0] == 0);
                verify(probeIndices[length - 1] == length - 1);
                blocks[i] = probeBlock;
            }
            else {
                // probeIndices are sequential without holes
                verify(probeIndices[length - 1] - probeIndices[0] == length - 1);
                blocks[i] = probeBlock.getRegion(probeIndices[0], length);
            }
        }

        Page buildPage = buildPageBuilder.build();
        int offset = probeOutputChannels.length;
        for (int i = 0; i < buildOutputChannelCount; i++) {
            blocks[offset + i] = buildPage.getBlock(i);
        }
        return new Page(buildPageBuilder.getPositionCount(), blocks);
    }