findepi commented on code in PR #11304: URL: https://github.com/apache/iceberg/pull/11304#discussion_r1797775137
########## api/src/main/java/org/apache/iceberg/util/CharSequenceMap.java: ########## @@ -132,12 +133,12 @@ public Set<CharSequence> keySet() { keySet.add(wrapper.get()); } - return keySet; + return Collections.unmodifiableSet(keySet); Review Comment: Generally writing a good Map implementation from scratch is super hard. I did that for Trino once because JDK's IdentityMap violates (violated?) some Map contract aspects, and it was ton of code and even more tests. Using mainstream implementations is really much saner. -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org