gaborkaszab commented on code in PR #18486:
URL: https://github.com/apache/iceberg/pull/18486#discussion_r4470102570
##########
core/src/main/java/org/apache/iceberg/encryption/InputFilesDecryptor.java:
##########
@@ -83,6 +100,39 @@ private static Collection<ContentFile<?>>
referencedFiles(Iterable<FileScanTask>
return files.values();
}
+ private static Collection<ContentFile<?>> changelogReferencedFiles(
+ Iterable<ChangelogScanTask> tasks) {
+ Map<String, ContentFile<?>> files = Maps.newHashMap();
+ for (ChangelogScanTask task : tasks) {
+ if (task instanceof AddedRowsScanTask addedRowsTask) {
+ Stream.concat(Stream.of(addedRowsTask.file()),
addedRowsTask.deletes().stream())
+ .forEach(file -> files.put(file.location(), file));
+ } else if (task instanceof DeletedDataFileScanTask deletedDataFileTask) {
+ Stream.concat(
+ Stream.of(deletedDataFileTask.file()),
+ deletedDataFileTask.existingDeletes().stream())
+ .forEach(file -> files.put(file.location(), file));
+ } else if (task instanceof DeletedRowsScanTask) {
+ throw new UnsupportedOperationException("Deleted rows scan task is not
supported yet");
Review Comment:
With the latest changes, I added support for `DeletedRowsScanTask` too. I
restructured the code, changes `ScanTask` implementation to tell their
referenced files themselves, not rely on other classes to figure that out.
--
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]