presto-main/src/main/java/io/prestosql/operator/unnest/UnnestBlockBuilder.java/UnnestBlockBuilder/buildOutputAndFlush
class UnnestBlockBuilder:    public Block buildOutputAndFlush()
    {
        Block outputBlock;
        if (usingCopiedBlock) {
            outputBlock = outputBlockBuilder.build();
        }
        else {
            outputBlock = new DictionaryBlock(positionCount, source, ids);
        }

        // Flush stored state, so that ids can not be modified after the dictionary has been constructed
        clearCurrentOutput();

        return outputBlock;
    }