pvary commented on code in PR #18481:
URL: https://github.com/apache/iceberg/pull/18481#discussion_r4256746563
##########
data/src/main/java/org/apache/iceberg/data/GenericReader.java:
##########
@@ -32,41 +34,38 @@
import org.apache.iceberg.io.CloseableGroup;
import org.apache.iceberg.io.CloseableIterable;
import org.apache.iceberg.io.CloseableIterator;
-import org.apache.iceberg.io.FileIO;
-import org.apache.iceberg.io.InputFile;
import org.apache.iceberg.relocated.com.google.common.collect.Iterables;
import org.apache.iceberg.util.PartitionUtil;
class GenericReader implements Serializable {
- private final FileIO io;
+ private final EncryptingFileIO io;
private final Schema tableSchema;
private final Schema projection;
private final boolean caseSensitive;
private final boolean reuseContainers;
GenericReader(TableScan scan, boolean reuseContainers) {
- this.io = scan.table().io();
+ this.io = EncryptingFileIO.combine(scan.table().io(),
scan.table().encryption());
this.tableSchema = scan.table().schema();
this.projection = scan.schema();
this.caseSensitive = scan.isCaseSensitive();
this.reuseContainers = reuseContainers;
}
CloseableIterator<Record> open(CloseableIterable<CombinedScanTask> tasks) {
- Iterable<FileScanTask> fileTasks =
- Iterables.concat(Iterables.transform(tasks, CombinedScanTask::files));
- return CloseableIterable.concat(Iterables.transform(fileTasks,
this::open)).iterator();
+ return CloseableIterable.concat(Iterables.transform(tasks,
this::open)).iterator();
}
public CloseableIterable<Record> open(CombinedScanTask task) {
return new CombinedTaskIterable(task);
}
- public CloseableIterable<Record> open(FileScanTask task) {
- DeleteFilter<Record> deletes = new GenericDeleteFilter(io, task,
tableSchema, projection);
+ private CloseableIterable<Record> open(FileScanTask task,
InputFilesDecryptor decryptor) {
+ DeleteFilter<Record> deletes =
+ new GenericDeleteFilter(decryptor::getInputFile, task, tableSchema,
projection);
Review Comment:
Do we need to encrypt/decrypt delete files?
--
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]