kbendick commented on a change in pull request #3148:
URL: https://github.com/apache/iceberg/pull/3148#discussion_r715236373



##########
File path: 
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/ArrowReader.java
##########
@@ -308,7 +307,11 @@ public boolean hasNext() {
 
     @Override
     public ColumnarBatch next() {
-      return current;
+      if (hasNext()) {
+        return currentIterator.next();

Review comment:
       I can't think of anything that would improve the logic.
   
   I'm a bit hesitant about copying some of the logic from `CloseableIterator` 
as there are a few situations we've seen where that hangs. But in the absence 
of a complete understanding of that issue, I think it's fine to borrow form 
there as it's the same situation.
   
   Also, thanks for letting me know that this came from `CloseableIterator`. I 
have plans to begin researching that soon and that helps. 👍 




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