abstractdog commented on code in PR #5548: URL: https://github.com/apache/hive/pull/5548#discussion_r1845319831
########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/vector/HiveDeleteFilter.java: ########## @@ -142,7 +143,7 @@ public HiveBatchContext next() { @Override public void close() throws IOException { - srcIterator.close(); + IOUtils.close(srcIterator, deleteInputIterable, deleteOutputIterable); Review Comment: looks good to me, however I would suggest an additional minor refactor: deleteInputIterable, deleteOutputIterable are defined outside of new CloseableIterable<HiveBatchContext>. in the filterBatch, can you move them as final fields into the CloseableIterable (both: deleteInputIterable, deleteOutputIterable, deleteOutputIterator), emphasizing that it owns all that stuff, so it's assumed to close them also otherwise, their closure makes sense -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org