Heltman commented on code in PR #7844:
URL: https://github.com/apache/iceberg/pull/7844#discussion_r1429368849


##########
core/src/main/java/org/apache/iceberg/util/ParallelIterable.java:
##########
@@ -67,10 +70,17 @@ private ParallelIterator(
                             try (Closeable ignored =
                                 (iterable instanceof Closeable) ? (Closeable) 
iterable : () -> {}) {
                               for (T item : iterable) {
-                                queue.add(item);
+                                if (closed) {
+                                  queue.clear();
+                                  return;
+                                }
+                                queue.put(item);
                               }
                             } catch (IOException e) {
                               throw new RuntimeIOException(e, "Failed to close 
iterable");
+                            } catch (InterruptedException e) {
+                              throw new RuntimeException(

Review Comment:
   @danielcweeks If we had closed this iterator, we don't care of throw error 
or log. I don't use log only because this class don't have log, I just follow 
it. Maybe we can add log to this class.



-- 
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-unsubscr...@iceberg.apache.org

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


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

Reply via email to