stevenzwu commented on a change in pull request #2105:
URL: https://github.com/apache/iceberg/pull/2105#discussion_r632178642
##########
File path: flink/src/main/java/org/apache/iceberg/flink/source/DataIterator.java
##########
@@ -79,6 +83,27 @@ InputFile getInputFile(String location) {
return inputFiles.get(location);
}
+ public void seek(CheckpointedPosition checkpointedPosition) {
+ // skip files
+ Preconditions.checkArgument(checkpointedPosition.getOffset() <
combinedTask.files().size(),
+ String.format("Checkpointed file offset is %d, while CombinedScanTask
has %d files",
+ checkpointedPosition.getOffset(), combinedTask.files().size()));
+ for (long i = 0L; i < checkpointedPosition.getOffset(); ++i) {
+ tasks.next();
+ }
+ updateCurrentIterator();
+ // skip records within the file
+ for (long i = 0; i < checkpointedPosition.getRecordsAfterOffset(); ++i) {
+ if (hasNext()) {
+ next();
+ } else {
+ throw new IllegalStateException("Not enough records to skip: " +
Review comment:
yeah. this is already fixed in the child PR
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]