flyrain commented on code in PR #11390:
URL: https://github.com/apache/iceberg/pull/11390#discussion_r1826603841
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java:
##########
@@ -93,10 +93,10 @@ protected CloseableIterator<ColumnarBatch>
open(FileScanTask task) {
InputFile inputFile = getInputFile(filePath);
Preconditions.checkNotNull(inputFile, "Could not find InputFile associated
with FileScanTask");
- SparkDeleteFilter deleteFilter =
- task.deletes().isEmpty()
- ? null
- : new SparkDeleteFilter(filePath, task.deletes(), counter());
+ SparkDeleteFilter sparkDeleteFilter =
+ new SparkDeleteFilter(filePath, task.deletes(), counter(), true);
+
+ SparkDeleteFilter deleteFilter = task.deletes().isEmpty() ? null :
sparkDeleteFilter;
Review Comment:
We don't need delete filter if `task.deletes().isEmpty()`, but the new code
always creates a filter object. How about this?
```
filter = null;
if(!task.deletes().isEmpty()) {
filter = new filter()
}
```
--
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]