flyrain commented on code in PR #4683:
URL: https://github.com/apache/iceberg/pull/4683#discussion_r875175276


##########
data/src/main/java/org/apache/iceberg/data/DeleteFilter.java:
##########
@@ -94,6 +95,12 @@ protected DeleteFilter(String filePath, List<DeleteFile> 
deletes, Schema tableSc
     this.eqDeletes = eqDeleteBuilder.build();
     this.requiredSchema = fileProjection(tableSchema, requestedSchema, 
posDeletes, eqDeletes);
     this.posAccessor = 
requiredSchema.accessorForField(MetadataColumns.ROW_POSITION.fieldId());
+    this.hasColumnIsDeleted = 
requestedSchema.findField(MetadataColumns.IS_DELETED.fieldId()) != null;
+    this.columnIsDeletedPosition = 
requestedSchema.columns().indexOf(MetadataColumns.IS_DELETED);

Review Comment:
   I didn't see any difference between them. Although we got the following code 
in the method `fileProjection()`, I don't think the code takes effect since the 
method `fileProjection()` is to get the columns which are required by equality 
deletes and the pos metadata column if pos delete is there. Anyway, I admit 
it's safer to use `requiredSchema` for the future change. Will make the change.
   ```
       if (missingIds.contains(MetadataColumns.IS_DELETED.fieldId())) {
         columns.add(MetadataColumns.IS_DELETED);
       }
   ```



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