stevenzwu commented on a change in pull request #2905:
URL: https://github.com/apache/iceberg/pull/2905#discussion_r702013677
##########
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:
This is also tied to the other comment where we need `DataIterator` to
be generic.
What you described above is similar to the current status, where we have
`RowDataIterator` extends from `DataIterator`. Due to inheritance,
`RowDataIterator` can call protected methods/variables from base class.
If we switch to composition model, we need to pass in `InputFilesDecryptor`
to the `RowDataFileScanTaskReader`
--
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]