rdblue commented on a change in pull request #4060:
URL: https://github.com/apache/iceberg/pull/4060#discussion_r801825132



##########
File path: 
flink/v1.14/flink/src/main/java/org/apache/iceberg/flink/source/DataIterator.java
##########
@@ -62,18 +96,25 @@ public boolean hasNext() {
   @Override
   public T next() {
     updateCurrentIterator();
+    recordOffset += 1;
     return currentIterator.next();
   }
 
+  public boolean isCurrentFileDone() {
+    return !currentIterator.hasNext();
+  }
+
   /**
    * Updates the current iterator field to ensure that the current Iterator
    * is not exhausted.
    */
   private void updateCurrentIterator() {
     try {
-      while (!currentIterator.hasNext() && tasks.hasNext()) {
+      while (!currentIterator.hasNext() && fileTasksIterator.hasNext()) {
         currentIterator.close();
-        currentIterator = openTaskIterator(tasks.next());
+        currentIterator = openTaskIterator(fileTasksIterator.next());
+        fileOffset += 1;
+        recordOffset = 0;

Review comment:
       Nit: `0L` since the offset is a long.




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