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 A1FAC200C64 for ; Fri, 28 Apr 2017 10:06:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A0884160BA3; Fri, 28 Apr 2017 08:06:43 +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 C14FD160B8C for ; Fri, 28 Apr 2017 10:06:42 +0200 (CEST) Received: (qmail 54341 invoked by uid 500); 28 Apr 2017 08:06:41 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 54331 invoked by uid 99); 28 Apr 2017 08:06:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2017 08:06:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5F10A1813C8 for ; Fri, 28 Apr 2017 08:06:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.98 X-Spam-Level: * X-Spam-Status: No, score=1.98 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=data-artisans-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id K4uadxqqs-bq for ; Fri, 28 Apr 2017 08:06:39 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1A8975FCBB for ; Fri, 28 Apr 2017 08:06:39 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id m123so39264470wma.0 for ; Fri, 28 Apr 2017 01:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=data-artisans-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=OagaVmYinlgDXJTSL1x510mFYeaBkgB85Yp9eE6ZbQc=; b=zPVQECNg6sCGH5o5qcA+r1NZc9ee7njdXoiR9lN+xsmDtb22ZU/FodPvAulJ6eHEfF V073gvec55z95l78Y7rcn37Ztu9uUquRzrK5oznOzHGG3ti054dErorPkOtl3C734ALh m6faFYfZgEd77uN5Rmc2hPCRWdSORvtPOklJZQVAlZSYyX/X4rqZ8DtGm/z0McwhIwh7 CG9I5XVPrPMsAvr1VwxxXkGKWVBaUQGzlTnt2t5PESUy8psRBK6AnnyptPFV9gZwA2Iy 41XdLCeZ9qQWGKeUQHiM9QwS5Viki9ltSYNjldNe9d6bFZHjLy5K/bQnrjCnDmJJMdUM yKRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=OagaVmYinlgDXJTSL1x510mFYeaBkgB85Yp9eE6ZbQc=; b=GDkBP52MgJj+UjQUR8ORCNWKLHL6+5HdCZVpuHdkgF6JpmvdCRSDXb+K5WV9o4OGtz sjItfoR3hI1S7NFWtqhf3MnhpU/wc3wUq/lV/tgEGACeY/nlmFYheFMOOmFStyjjU0eO 55VIKi6NDkAcI7nHA1GhRhtpdZKYDcTpJfp4QV+aOpuWunept5N90H87NZLyxoUmJKj7 j27C53r7gPIfKC0DucP3t5C8741ngV+KnJZ6QT9LuOeO98SfFbvesYxFpPWQNyM/BoEh /OCg9MuLOpoXWp0qf/usva5dzUFwDz6cSlzjefcL7aq//rgV+BdUXT8tIuRaNiN7q+pt GKvg== X-Gm-Message-State: AN3rC/43ahk6U7t8eonourk7S2UU7V/yIgZ8GvWzdsZjoVRgsWb0rbvl UFP31FBNUKTB2UYN X-Received: by 10.80.163.196 with SMTP id t4mr8176696edb.158.1493366792184; Fri, 28 Apr 2017 01:06:32 -0700 (PDT) Received: from [192.168.178.65] (dslb-084-059-068-070.084.059.pools.vodafone-ip.de. [84.59.68.70]) by smtp.gmail.com with ESMTPSA id y24sm1627217edb.62.2017.04.28.01.06.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2017 01:06:31 -0700 (PDT) From: Kostas Kloudas Message-Id: <35F37204-47CF-4F41-8BE4-1DF54A20EFF7@data-artisans.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_4F7F9147-3015-4975-AE43-F6FE27330E9D" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: CEP join across events Date: Fri, 28 Apr 2017 10:06:30 +0200 In-Reply-To: Cc: Dawid Wysakowicz , user@flink.apache.org To: Elias Levy References: <3B514E62-F737-45C1-8F8C-D08E00F95B88@data-artisans.com> X-Mailer: Apple Mail (2.3273) archived-at: Fri, 28 Apr 2017 08:06:43 -0000 --Apple-Mail=_4F7F9147-3015-4975-AE43-F6FE27330E9D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Elias, I think this is a really interesting suggestion for the case where you = do not have an =E2=80=9Caccumulating=E2=80=9D=20 value. Because imagine that you want to accept the =E2=80=9Cnext=E2=80=9D = element, if the sum of all the previous=20 is less than Y. To have a similar syntax with an accumulator, we should = add more methods with=20 additional arguments, right?=20 For a first release, we opted for the simplest solution so that we can = gather more information on=20 how people intend to use the new features. Despite that, I really think = that it is an interesting and=20 more intuitive syntax so could you open a JIRA so that we move the = discussion there, or if you=20 want I can open it for you. Thanks a lot for the suggestion, Kostas > On Apr 28, 2017, at 1:09 AM, Elias Levy = wrote: >=20 > It would be useful if there were a cleaner syntax for specifying = relationships between matched events, as in an SQL join, particularly = for conditions with a quantifier of one. >=20 > At the moment you have to do something like >=20 > Pattern. > .begin[Foo]("first") > .where( first =3D> first.baz =3D=3D 1 ) > .followedBy("next") > .where({ (next, ctx) =3D> > val first =3D ctx.getEventsForPattern("first").next > first.bar =3D=3D next.bar && next =3D> next.boo =3D "x" > }) >=20 > which is not very clean. It would friendlier if you could do = something like: >=20 > Pattern. > .begin[Foo]("first") > .where( first =3D> first.baz =3D=3D 1 ) > .followedBy("next") > .relatedTo("first", { (first, next) =3D> first.bar =3D=3D = next.bar }) > .where( next =3D> next.boo =3D "x" ) >=20 >=20 >=20 > On Thu, Apr 27, 2017 at 1:21 AM, Kostas Kloudas = > = wrote: > Glad that this is not a blocker for you and=20 > you are right that we should clarify it better in the documentation. >=20 --Apple-Mail=_4F7F9147-3015-4975-AE43-F6FE27330E9D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Elias,

I= think this is a really interesting suggestion for the case where you do = not have an =E2=80=9Caccumulating=E2=80=9D 
value. Because imagine that you want to accept the =E2=80=9Cnex= t=E2=80=9D element, if the sum of all the previous 
is less than Y. To have a similar syntax with an accumulator, = we should add more methods with 
additional = arguments, right? 

For a first release, we opted for the simplest solution so = that we can gather more information on 
how = people intend to use the new features. Despite that, I really think that = it is an interesting and 
more intuitive = syntax so could you open a JIRA so that we move the discussion there, or = if you 
want I can open it for you.

Thanks a lot = for the suggestion,
Kostas

On Apr 28, 2017, at 1:09 AM, = Elias Levy <fearsome.lucidity@gmail.com> wrote:

It would be useful if there were a cleaner = syntax for specifying relationships between matched events, as in an SQL = join, particularly for conditions with a quantifier of one.

At the moment you have = to do something like

    Pattern.
      .begin[Foo]("first")
        .where( first =3D> first.baz = =3D=3D 1 )
      = .followedBy("next")
        = .where({ (next, ctx) =3D>
      =     val first =3D = ctx.getEventsForPattern("first").next
    =       first.bar =3D=3D next.bar && next =3D> = next.boo =3D "x"
        = })

which = is not very clean.  It would friendlier if you could do something = like:

    Pattern.
    =   .begin[Foo]("first")
      =   .where( first =3D> first.baz =3D=3D 1 )
      .followedBy("next")
        .relatedTo("first", { (first, = next) =3D> first.bar =3D=3D next.bar })
  =       .where( next =3D> next.boo =3D "x" )



On Thu, Apr 27, 2017 at 1:21 AM, Kostas Kloudas = <k.kloudas@data-artisans.com> wrote:
Glad that this is not a blocker for you = and 
you are right that we should clarify it = better in the documentation.


= --Apple-Mail=_4F7F9147-3015-4975-AE43-F6FE27330E9D--