presto-spi/src/main/java/io/prestosql/spi/block/DictionaryBlock.java/DictionaryBlock/isCompact
class DictionaryBlock:    public boolean isCompact()
    {
        if (dictionary instanceof DictionaryBlock) {
            return false;
        }

        if (uniqueIds < 0) {
            calculateCompactSize();
        }
        return uniqueIds == dictionary.getPositionCount();
    }