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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
