ConeyLiu commented on code in PR #5632: URL: https://github.com/apache/iceberg/pull/5632#discussion_r1007807328
########## core/src/main/java/org/apache/iceberg/ManifestReader.java: ########## @@ -126,15 +138,12 @@ protected ManifestReader( specId = Integer.parseInt(specProperty); } - if (specsById != null) { - this.spec = specsById.get(specId); + if (specsById != null && specsById.containsKey(specId)) { Review Comment: Updated the code, I think the most concerns come from the guard code: `specsById.contains(specId)`. I removed it and match the existing implementation. -- 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