xiaoxuandev commented on issue #9923: URL: https://github.com/apache/iceberg/issues/9923#issuecomment-2011383283
From the stack trace, essentially the error is caused by duplicated keys put into the ImmutableMap.Builder. But looking at the implementation, ``` public Map<Integer, String> byId() { ImmutableMap.Builder<Integer, String> builder = ImmutableMap.builder(); nameToId.forEach((key, value) -> builder.put(value, key)); // <-- HERE MAP IS IMMUTABLE return builder.build(); } ``` All entries are from nameToId which itself is a HashMap and cannot contain duplicated keys. So I'm confused how can duplicated keys get into the Builder. -- 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