openinx commented on a change in pull request #2905:
URL: https://github.com/apache/iceberg/pull/2905#discussion_r700718087
##########
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:
Is there necessary to expose the `RowDataFileReader` to the
FlinkInputFormat ? The calling chain is actually: FlinkInputFormat ( whole
scan) -> DataIterator (CombinedScanTask reader) -> RowDataFileReader (
FileScanTask reader ). I mean the FlinkInputFormat won't call the
FileScanTask reader directly, so I'd prefer to hidden the internal details
about how to construct the RowDataFileReader inside DataIterator. This is more
in line with the interface design of software design.
--
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]