flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: [DISCUSS] Should we supply a new Iterator instance for Functions with Iterable input(s) like CoGroupFunction ?
Date Wed, 22 Feb 2017 10:10:10 GMT
this is probably an oversight. If it helps you implement the feature,
please go ahead and add a sub-issue for solving the Iterator problem.


On Tue, 21 Feb 2017 at 16:13 Lin Li <lincoln.86xy@gmail.com> wrote:

> Hi,
>     When I try to implement
> https://issues.apache.org/jira/browse/FLINK-5498
> via "dataset.coGroup(another dataset)" with a generated
> CoGroupFunction.(CoGroupFunction
> interface: public void coGroup(Iterable<IN1> first, Iterable<IN2> second,
> Collector<O> out)
>      I couldn't get the right results, then I saw the backend Iterator did
> not supply a new instance when invoked the "Iterable.iterator()" after
> debugging.
> (see  org.apache.flink.api.common.operators.util.ListKeyGroupedIterator,
>  it differs from usual iterable collections in java which will implement
> the iterator() method that supply a new iterator instance for the
> collection. And this is not mentioned either in comments or document.)
> IMO, iterable collections' new iterator instance requirements probably
> useful for other cases, so is it necessary to add this feature?
> Greatful if someone can tell me the motivation that ListKeyGroupedIterator
> didn't supply a new iterator instance.
> What do you think?
> Best, Lincoln

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message