ConeyLiu commented on code in PR #5632:
URL: https://github.com/apache/iceberg/pull/5632#discussion_r978438340


##########
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:
   Yes, this part of the code is the same as the above part. Make sure we could 
get the spec from the `specId` and `specsById`. Here we check again because the 
`specId` is read from the file.



-- 
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]

Reply via email to