amogh-jahagirdar commented on code in PR #15268:
URL: https://github.com/apache/iceberg/pull/15268#discussion_r2785029382


##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -828,7 +855,8 @@ public List<Types.NestedField> equalityFields() {
           if (equalityFields == null) {
             List<Types.NestedField> fields = Lists.newArrayList();
             for (int id : wrapped.equalityFieldIds()) {
-              Types.NestedField field = spec.schema().findField(id);
+              Types.NestedField field = fieldLookup.apply(id);
+              Preconditions.checkArgument(field != null, "Cannot find field 
for ID %s", id);

Review Comment:
   I just copied the new test into a branch without the fix to check this, yes 
it fails when we try and prune out which equality deletes to apply based on 
stats because we won't be able to resolve the field type in the first place. 
   
   
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/DeleteFileIndex.java#L233
 fails with a NPE



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