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

ASF GitHub Bot commented on FLINK-6772:
---------------------------------------

GitHub user kl0u opened a pull request:

    https://github.com/apache/flink/pull/4084

    [FLINK-6772] [cep] Fix ordering (by timestamp) of matched events.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kl0u/flink cep-fix-ordering

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4084.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4084
    
----
commit b3f38aa64addd73b20f6ab51f98f95017cb7e348
Author: kkloudas <[email protected]>
Date:   2017-05-31T15:48:34Z

    [FLINK-6772] [cep] Fix ordering (by timestamp) of matched events.

----


> Incorrect ordering of matched state events in Flink CEP
> -------------------------------------------------------
>
>                 Key: FLINK-6772
>                 URL: https://issues.apache.org/jira/browse/FLINK-6772
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.3.0
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Kostas Kloudas
>              Labels: flink-rel-1.3.1-blockers
>
> I've stumbled across an unexepected ordering of the matched state events. 
> Pattern:
> {code}
> Pattern<String, ?> pattern = Pattern
>     .<String>begin("start")
>         .where(new IterativeCondition<String>() {
>             @Override
>             public boolean filter(String s, Context<String> context) throws 
> Exception {
>                 return s.startsWith("a-");
>             }
>         }).times(4).allowCombinations()
>     .followedByAny("end")
>         .where(new IterativeCondition<String>() {
>             public boolean filter(String s, Context<String> context) throws 
> Exception {
>                 return s.startsWith("b-");
>             }
>     }).times(3).consecutive();
> {code}
> Input event sequence:
> a-1, a-2, a-3, a-4, b-1, b-2, b-3
> On b-3 a matched pattern would be triggered.
> Now, in the {{Map<String, List<IN>>}} map passed via {{select}} in 
> {{PatternSelectFunction}}, the list for the "end" state is:
> b-3, b-1, b-2.
> Based on the timestamp of the events (simply using processing time), the 
> correct order should be b-1, b-2, b-3.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to