You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zhongyujiang (via GitHub)" <gi...@apache.org> on 2023/03/18 06:01:14 UTC

[GitHub] [iceberg] zhongyujiang commented on pull request #7133: API: Fix CharSequenceSet#retainAll.

zhongyujiang commented on PR #7133:
URL: https://github.com/apache/iceberg/pull/7133#issuecomment-1474739619

   @amogh-jahagirdar Thanks for your comment, when adding tests I found that currently `retainAll` can not work properly. The reason is that `Iterables#retainAll` will test whether each element in `wrapperSet` exists in `toRetain` set and retain an element when `toRetain#contains` returns `true`. However, `wrapperSet` is a `Set<CharSequenceWrapper>` and what we want to retain should be a collection of `CharSequence`. In such cases `toRetain#contains` will always return `false` because their classes are different. The same happens in `removeAll`.
   
   In the new commit, the passed in `CharSequence` objects will be converted to `CharSequenceWrapper` and then for comparison.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org