guykhazma commented on code in PR #10935:
URL: https://github.com/apache/iceberg/pull/10935#discussion_r2076010462


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/ChangelogRowReader.java:
##########
@@ -170,4 +240,10 @@ private static Stream<ContentFile<?>> 
addedRowsScanTaskFiles(AddedRowsScanTask t
     List<DeleteFile> deletes = task.deletes();
     return Stream.concat(Stream.of(file), deletes.stream());
   }
+
+  private static Stream<ContentFile<?>> 
deletedRowsScanTaskFiles(DeletedRowsScanTask task) {
+    DataFile file = task.file();
+    List<DeleteFile> deletes = task.addedDeletes();

Review Comment:
   Shouldn't it also pick up the existing deletes?
   Something like:
   ```
   List<DeleteFile> existingDeletes = task.existingDeletes();
       List<DeleteFile> addedDeletes = task.addedDeletes();
       List<DeleteFile> deletes =
           
ImmutableList.<DeleteFile>builder().addAll(existingDeletes).addAll(addedDeletes).build();
   ```
   
   without this I noticed that it can lead to null pointer exceptions when 
there as an overwrite snapshot which has existing deletes in it.



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