Github user StephanEwen commented on the pull request:
https://github.com/apache/incubator-flink/pull/84#issuecomment-50518588
Throwing an error for a second `iterator()` call would be possible, but
quite some change.
For example in CoGroup, I use the simply `Collections.emptySet()` as the
Iterable for empty sides. The `KeyGroupedIterable` for the reduce function also
simply returns itself as the iterator, which means the original lightweight
grouping logic can stay the same.
Also, the some of old internal tests (Record-based) make use of the
possibility to mix the *Iterable* and the *Iterator*. I could change that, if
needed.
We could make this change, but I would like to hear some opinion on whether
this is actually more a confusing trap ("Why the heck do I get an empty set the
second time I iterate over the input"), or whether this is actually understood
that these inputs are what Scala calls a *TraversableOnce*
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---