gaborkaszab commented on code in PR #19121:
URL: https://github.com/apache/iceberg/pull/19121#discussion_r4757671340
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertReader.java:
##########
@@ -107,7 +109,7 @@ public void open(OpenContext openContext) throws Exception {
eqFieldIds);
fieldSerializer = new StructLikeSerializer();
keyWrapper = new InternalRecordWrapper(keySchema.asStruct());
- deleteLoader = new BaseDeleteLoader(deleteFile ->
table.io().newInputFile(deleteFile));
+ encryptingIO = EncryptingFileIO.combine(table.io(), table.encryption());
Review Comment:
@singhpk234 I'm not exactly sure I understand your test suggestion.
EncryptingFileIO is a wrapper or a view around the table's IO. I don't think we
can test much here, because it seems a catalog responsibility to close the IO
too, we just create a wrapper around here.
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertReader.java:
##########
@@ -107,7 +109,7 @@ public void open(OpenContext openContext) throws Exception {
eqFieldIds);
fieldSerializer = new StructLikeSerializer();
keyWrapper = new InternalRecordWrapper(keySchema.asStruct());
- deleteLoader = new BaseDeleteLoader(deleteFile ->
table.io().newInputFile(deleteFile));
+ encryptingIO = EncryptingFileIO.combine(table.io(), table.encryption());
Review Comment:
The design is that we use `InputFilesDecryptor` to create `InputFiles`,
however, it's per `ScanTask` so we can't create it here. As a result we defer
creating a `BaseDeleteLoader` to `processElement`.
Also, going with the suggestion here we'd miss using the `bulkDecrypt()`
approach for all the affected files, that we'd like to avoid.
Note, this is the same approach we do with other readers.
##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertReader.java:
##########
@@ -152,7 +154,8 @@ private void processDataFile(
throws IOException {
ContentFile<?> file = task.file();
Schema readSchema = appendRowPosition(keySchema);
- PositionDeleteIndex existingDeletes = loadExistingDVs(task,
file.location());
+ InputFilesDecryptor decryptor =
InputFilesDecryptor.fromTasks(List.of(task), encryptingIO);
Review Comment:
Note, other readers either already have this integration with the decryptor
(GenericReader, Flink's row reader, IcebergInputFormat in MR), or they have an
ongoing PR (Spark's readers, ArrowReader).
I think doing the integration here now is the right time.
--
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]