presto-spi/src/main/java/io/prestosql/spi/block/DictionaryBlock.java/DictionaryBlock/copyRegion
class DictionaryBlock:    @Override
    public Block copyRegion(int position, int length)
    {
        checkValidRegion(positionCount, position, length);
        int[] newIds = Arrays.copyOfRange(ids, idsOffset + position, idsOffset + position + length);
        DictionaryBlock dictionaryBlock = new DictionaryBlock(dictionary, newIds);
        return dictionaryBlock.compact();
    }