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 2022/07/19 16:54:54 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5306: API: CloseableIterable.concat evaluates first item twice

nastra commented on code in PR #5306:
URL: https://github.com/apache/iceberg/pull/5306#discussion_r924747190


##########
api/src/main/java/org/apache/iceberg/io/CloseableIterable.java:
##########
@@ -148,8 +143,6 @@ public CloseableIterator<E> iterator() {
 
       private ConcatCloseableIterator(Iterable<CloseableIterable<E>> inputs) {
         this.iterables = inputs.iterator();
-        this.currentIterable = iterables.next();
-        this.currentIterator = currentIterable.iterator();

Review Comment:
   The init code here already implied that there would be at least one element, so this was necessary to make the code work even with empty iterables



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