Hi Elias,
I think this is a really interesting suggestion for the case where you do not
have an “accumulating”
value. Because imagine that you want to accept the “next” element, if the sum
of all the previous
is less than Y. To have a similar syntax with an accumulator, we should add
more met
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 ==
Hi Elias,
Glad that this is not a blocker for you and
you are right that we should clarify it better in the documentation.
Thanks,
Kostas
> On Apr 27, 2017, at 3:28 AM, Elias Levy wrote:
>
> You are correct. Apologies for the confusion. Given that
> ctx.getEventsForPattern returns an itera
You are correct. Apologies for the confusion. Given
that ctx.getEventsForPattern returns an iterator instead of a value and
that the example in the documentation deals with summing multiple matches,
I got the impression that the call would return all previous matches
instead of one at a time for
Hi Elias,
If I understand correctly your use case, you want for an input:
event_1 = (type=1, value_a=K, value_b=X)
event_2 = (type=2, value_a=K, value_b=X)
event_3 = (type=1, value_a=K, value_b=Y)
to get a match:
event_1, event_2
and discard event_3, right?
In this case, Dawid is correct and
Hi Elias,
You can do it with 1.3 and IterativeConditions. Method
ctx.getEventsForPattern("foo") returns only those events that were matched
in "foo" pattern in that particular branch.
I mean that for a sequence like (type =1, value_b = X); (type=1,
value_b=Y); (type=2, value_b=X) both events of ty
There doesn't appear to be a way to join events across conditions using the
CEP library.
Consider events of the form (type, value_a, value_b) on a stream keyed by
the value_a field.
Under 1.2 you can create a pattern that for a given value_a, as specified
by the stream key, there is a match if an