presto-main/src/main/java/io/prestosql/type/setdigest/SetDigest.java/SetDigest/mergeWith
class SetDigest:    public void mergeWith(SetDigest other)
    {
        hll.mergeWith(other.hll);
        LongBidirectionalIterator iterator = other.minhash.keySet().iterator();
        while (iterator.hasNext()) {
            long key = iterator.nextLong();
            int count = minhash.get(key) + other.minhash.get(key);
            minhash.put(key, Shorts.saturatedCast(count));
        }
        while (minhash.size() > maxHashes) {
            minhash.remove(minhash.lastLongKey());
        }
    }