@Override
    public boolean contains(Object obj) {
        if (obj instanceof CharSequence) {
            CharSequenceWrapper wrapper = wrappers.get();
            boolean result = wrapperSet.contains(wrapper.set((CharSequence) obj));
            wrapper.set(null); // don't hold a reference to the value
            return result;
        }
        return false;
    }
Copied from iceberg 1.1.x. Modify Set to concurrent Set.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/trick/CharSequenceSet.java