flyrain commented on code in PR #5248:
URL: https://github.com/apache/iceberg/pull/5248#discussion_r925852232
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/BatchDataReader.java:
##########
@@ -125,8 +120,10 @@ CloseableIterator<ColumnarBatch> open(FileScanTask task) {
return iter.iterator();
}
- private SparkDeleteFilter deleteFilter(FileScanTask task) {
- return task.deletes().isEmpty() ? null : new SparkDeleteFilter(task,
table().schema(), expectedSchema);
+ protected SparkDeleteFilter deleteFilter(CST task) {
+ Preconditions.checkArgument(task.isFileScanTask(), "Only FileScanTask is
supported for delete filtering");
Review Comment:
The same as RowDataReader, it makes sense to keep the 3-layer hierarchy. So
that we can have common logic on the first layer(BaseDataReader) and second
layer(RowDataReader and BatchDataReader). The subclass can share them.
```
BaseDataReader --> (RowDataReader, BatchDataReader)
RowDataReader --> (FileScanTaskReader, CDCReaders)
BatchDataReader --> (FileScanTaskReader, CDCReaders)
```
--
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]