openinx commented on a change in pull request #2905:
URL: https://github.com/apache/iceberg/pull/2905#discussion_r701737208



##########
File path: 
flink/src/main/java/org/apache/iceberg/flink/source/RowDataFileScanTaskReader.java
##########
@@ -47,51 +46,52 @@
 import org.apache.iceberg.types.TypeUtil;
 import org.apache.iceberg.util.PartitionUtil;
 
-class RowDataIterator extends DataIterator<RowData> {
+@Internal
+public class RowDataFileScanTaskReader implements FileScanTaskReader<RowData> {
 
   private final Schema tableSchema;
   private final Schema projectedSchema;
   private final String nameMapping;
   private final boolean caseSensitive;
 
-  RowDataIterator(CombinedScanTask task, FileIO io, EncryptionManager 
encryption, Schema tableSchema,
-                  Schema projectedSchema, String nameMapping, boolean 
caseSensitive) {
-    super(task, io, encryption);
+  public RowDataFileScanTaskReader(Schema tableSchema, Schema projectedSchema,
+                                   String nameMapping, boolean caseSensitive) {
     this.tableSchema = tableSchema;
     this.projectedSchema = projectedSchema;
     this.nameMapping = nameMapping;
     this.caseSensitive = caseSensitive;
   }
 
   @Override
-  protected CloseableIterator<RowData> openTaskIterator(FileScanTask task) {
+  public CloseableIterator<RowData> open(FileScanTask task, 
InputFilesDecryptor inputFilesDecryptor) {
     Schema partitionSchema = TypeUtil.select(projectedSchema, 
task.spec().identitySourceIds());
 
     Map<Integer, ?> idToConstant = partitionSchema.columns().isEmpty() ? 
ImmutableMap.of() :
         PartitionUtil.constantsMap(task, RowDataUtil::convertConstant);
 
-    FlinkDeleteFilter deletes = new FlinkDeleteFilter(task, tableSchema, 
projectedSchema);
-    CloseableIterable<RowData> iterable = deletes.filter(newIterable(task, 
deletes.requiredSchema(), idToConstant));
-
-    return iterable.iterator();
+    FlinkDeleteFilter deletes = new FlinkDeleteFilter(task, tableSchema, 
projectedSchema, inputFilesDecryptor);
+    return deletes
+        .filter(newIterable(task, deletes.requiredSchema(), idToConstant, 
inputFilesDecryptor))
+        .iterator();
   }
 
-  private CloseableIterable<RowData> newIterable(FileScanTask task, Schema 
schema, Map<Integer, ?> idToConstant) {
+  private CloseableIterable<RowData> newIterable(
+      FileScanTask task, Schema schema, Map<Integer, ?> idToConstant, 
InputFilesDecryptor inputFilesDecryptor) {

Review comment:
       Nit:  inputFilesDecryptor -> inputFilesDecrypter ?




-- 
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]

Reply via email to