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



##########
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) {

Review comment:
       If we construct the `RowDataFileScanTaskReader` inside the 
[DataIterator](https://github.com/apache/iceberg/pull/2905/files#diff-696823dda1232c713e658befb32b1c385a48b46c79ef25fc09edb70f5cc962a9R51),
  then we don't need to pass the `InputFilesDecryptor`  for every `open` 
FileScanTask method, we also don't need to pass the `InputFilesDecryptor`  to 
the newXXXIterable methods (I mean those changes could be reverted) because 
they could just use the class' private `InputFilesDecryptor` instance.




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