Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 65B3C200C23 for ; Wed, 22 Feb 2017 11:10:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 62693160B72; Wed, 22 Feb 2017 10:10:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AAE87160B49 for ; Wed, 22 Feb 2017 11:10:22 +0100 (CET) Received: (qmail 96669 invoked by uid 500); 22 Feb 2017 10:10:21 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 96658 invoked by uid 99); 22 Feb 2017 10:10:21 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 10:10:21 +0000 Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 712E61A026E for ; Wed, 22 Feb 2017 10:10:21 +0000 (UTC) Received: by mail-it0-f51.google.com with SMTP id 203so5457532ith.0 for ; Wed, 22 Feb 2017 02:10:21 -0800 (PST) X-Gm-Message-State: AMke39mFoG0qbjbjROmTI02SkVGoJhuPSHFLeHjUylx+mnCdGzJtV4xQthh/gUhvet9/HQFoQCMjNrIcjYTYVA== X-Received: by 10.36.198.133 with SMTP id j127mr1383966itg.72.1487758220813; Wed, 22 Feb 2017 02:10:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aljoscha Krettek Date: Wed, 22 Feb 2017 10:10:10 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [DISCUSS] Should we supply a new Iterator instance for Functions with Iterable input(s) like CoGroupFunction ? To: dev@flink.apache.org Content-Type: multipart/alternative; boundary=94eb2c07dd0643727405491bb4c3 archived-at: Wed, 22 Feb 2017 10:10:23 -0000 --94eb2c07dd0643727405491bb4c3 Content-Type: text/plain; charset=UTF-8 Hi, 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. Best, Aljoscha On Tue, 21 Feb 2017 at 16:13 Lin Li 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 first, Iterable second, > Collector 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 > --94eb2c07dd0643727405491bb4c3--