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



##########
File path: 
flink/src/main/java/org/apache/iceberg/flink/source/FlinkInputFormat.java
##########
@@ -42,21 +42,22 @@
   private static final long serialVersionUID = 1L;
 
   private final TableLoader tableLoader;
-  private final Schema tableSchema;
   private final FileIO io;
   private final EncryptionManager encryption;
   private final ScanContext context;
+  private final RowDataFileReader rowDataReader;
 
-  private transient RowDataIterator iterator;
+  private transient DataIterator<RowData> iterator;
   private transient long currentReadCount = 0L;
 
   FlinkInputFormat(TableLoader tableLoader, Schema tableSchema, FileIO io, 
EncryptionManager encryption,
                    ScanContext context) {
     this.tableLoader = tableLoader;
-    this.tableSchema = tableSchema;
     this.io = io;
     this.encryption = encryption;
     this.context = context;
+    this.rowDataReader = new RowDataFileReader(tableSchema,

Review comment:
       Sorry, I think I did not describe this more clear.  I mean the newly 
introduced `FileScanTaskReader` interface is nice to have in apache repo, so 
that others could provides  their own implementation, such as 
`AvroGenericRecordFileScanTaskReader`.   I don't think the latest commit's 
`AbstractFileScanTaskReader`  will help to share common code between the 
`AvroGenericRecordFileScanTaskReader`  & `RowDataFileScanTaskReader`  because 
its exposed classes such as `DeleteFilter`, `newAvroIterator`, 
`InputFilesDecryptor` are not stable enough, we may change/refactor them in the 
following PRs (The DeleteFilter will need a big refactor for supporting unified 
v2 compaction).   
   
   Let's just revert the commit 
https://github.com/apache/iceberg/pull/2905/commits/72348c7898c42566a8a5a071426b32f8ea746cfd,
  all the other things look great to me now,  I plan to merge this PR.  Thanks 
for the great work @stevenzwu  !




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