Closed CanBerker closed 3 years ago
@ghislainfourny . This issue was created as per your request to refactor iterator materialization in the top level iterator class. The comment above gives full details. In the current implementation, this function is implemented in RuntimeIterator:
What kind of a change did you have in mind? Could you please elaborate.
I think what I had in mind was adding a public method to the Iterator class that materializes an iterator:
List
This would simply make this functionality official and clean.
This function should ideally return an error if the iterator is already open (for this we may need to add an isOpen() method and a private field that keeps track of the "openness" of the iterator).
I think this is all addressed with various functions materializeAtMostOneItem, materializeOneItemOrNull, etc.
Originally posted by @ghislainfourny in https://github.com/Sparksoniq/sparksoniq/pull/85/files/c1e80ea7bcd7ee19f4ad0f7a9d67e93972746e1a