alexeykudinkin commented on code in PR #6745:
URL: https://github.com/apache/hudi/pull/6745#discussion_r995285997


##########
hudi-common/src/main/java/org/apache/hudi/common/util/ParquetReaderIterator.java:
##########
@@ -71,24 +66,15 @@ public T next() {
           throw new HoodieException("No more records left to read from parquet 
file");
         }
       }
-      T retVal = this.next;
-      this.next = read();

Review Comment:
   This is wrong, we should not be doing `read()` in next, instead it should be 
like following:
   
   ```
   def hasNext() {
     if (next == null) {
       next = read()
     }
     return next != null
   }
   
   def next() {
     if (next == null) throw 
     val ret = next
     next = null
     return next
   }
   ```



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

Reply via email to