cshuo commented on code in PR #18407:
URL: https://github.com/apache/hudi/pull/18407#discussion_r3007329002


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/util/ParquetReaderIterator.java:
##########
@@ -49,7 +49,11 @@ public boolean hasNext() {
       if (this.next == null) {
         this.next = parquetReader.read();
       }
-      return this.next != null;
+      boolean hasNextRecord = this.next != null;
+      if (!hasNextRecord) {

Review Comment:
   Consider making `close()` idempotent (guard with closed flag) to avoid 
repeated close side effects from different call paths, and tracking closed 
state and short-circuiting to false for `hasNext()`. 



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