rdblue commented on issue #272: Refactor AvroIterable and prevent multiple 
iterators
URL: https://github.com/apache/incubator-iceberg/pull/272#issuecomment-511264323
 
 
   I think in the first case, closing the iterator would do the right thing. 
Each inner iterator would be closed before the next one is opened, and the 
outer iterator must be left open the entire time because it is still in use.
   
   For the second case, I agree that the first iterator's resources are left 
open until the end of the try-with-resources, block. I think that's worth the 
trade-off, and callers can always close the iterator if they choose. So I'm 
okay with the trade-off of using the automatic close at the end of the try 
block.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to