You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/20 06:12:12 UTC

[GitHub] [iceberg] nastra commented on a change in pull request #3148: [ARROW] Vectorized Parquet Reads - Make ArrowReader's iterator idempotent

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



##########
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 think it would be sufficient to just call `currentIterator.next` here because the `NoSuchElementException` will be thrown implicitly when there's no other element




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org