flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elias Levy <fearsome.lucid...@gmail.com>
Subject Re: CEP join across events
Date Thu, 27 Apr 2017 23:09:14 GMT
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 => first.baz == 1 )
      .followedBy("next")
        .where({ (next, ctx) =>
          val first = ctx.getEventsForPattern("first").next
          first.bar == next.bar && next => next.boo = "x"
        })

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

    Pattern.
      .begin[Foo]("first")
        .where( first => first.baz == 1 )
      .followedBy("next")
        .relatedTo("first", { (first, next) => first.bar == next.bar })
        .where( next => next.boo = "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.
>

Mime
View raw message