[ 
https://issues.apache.org/jira/browse/FLINK-31040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136157#comment-18136157
 ] 

Mohammad Bani Hani commented on FLINK-31040:
--------------------------------------------

A pattern ending in notFollowedBy(...).within(...) whose stage before the NOT 
pattern is a loop (oneOrMore, timesOrMore, times(n, m)) or optional now emits 
the partial matches that stage could have completed when the window expires, 
instead of reporting them as timed out. Jobs that read the timeout side output 
of such patterns will see these as matches instead.

A relaxed times(n, m) followed by notFollowedBy now cancels an attempt when the 
forbidden event arrives while the attempt waits at an optional repeat, as 
oneOrMore() already did. Some wrong matches emitted before are no longer 
emitted.

When such a pattern uses greedy(), a savepoint taken by this version while it 
holds a partial match cannot be restored into an earlier version: the job fails 
at the first watermark ("State ... does not exist in the NFA"). Savepoints from 
earlier versions restore into this version.

> Looping pattern notFollowedBy at end missing an element
> -------------------------------------------------------
>
>                 Key: FLINK-31040
>                 URL: https://issues.apache.org/jira/browse/FLINK-31040
>             Project: Flink
>          Issue Type: Bug
>          Components: Library / CEP
>    Affects Versions: 1.17.0, 1.15.3, 1.16.1
>            Reporter: Juntao Hu
>            Priority: Major
>              Labels: pull-request-available
>
> Pattern: begin("A", 
> SKIP_TO_NEXT).oneOrMore().consecutive().notFollowedBy("B").within(Time.milliseconds(3))
> Sequence: <a1, 1L> <a2, 2L> <a3, 3L> <a4, 4L> <c1, 10L> will produce results 
> [a1, a2], [a2, a3], [a3], which obviously should be [a1, a2, a3], [a2, a3, 
> a4], [a3, a4], [a4].



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to