rdblue commented on issue #272: Refactor AvroIterable and prevent multiple 
iterators
URL: https://github.com/apache/incubator-iceberg/pull/272#issuecomment-510642230
 
 
   @vrozov, no. There is no way for Iterable to signal that it only supports a 
single iteration, and most iterables, like lists, maps, sets, etc. support 
iteration multiple times. I think that there isn't much point to using Iterable 
if you only intend to support a single iteration.
   
   The goal you want to accomplish should be done by making sure that resources 
are closed. I think a better approach would be for an iterator to close 
underlying resources automatically when it is exhausted.

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