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



##########
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:
       Thanks @nastra. 
   
   Yes, that was my first thought as well. But, I wanted this iterator to 
return all rows even if only next() is called repeatedly without checking 
hasNext(), and if we don't call hasNext() inside next(), currentIterator will 
not be initialized and possibly a NullPointerException will be thrown.




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