You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Juntao Hu (Jira)" <ji...@apache.org> on 2022/11/17 13:17:00 UTC

[jira] [Updated] (FLINK-30069) Expected prune behavior for matches with same priority

     [ https://issues.apache.org/jira/browse/FLINK-30069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juntao Hu updated FLINK-30069:
------------------------------
    Description: 
When a pattern produces several matches with same priority, is it the expected behavior to keep only the first dequeued one?

E.G.

pattern: A.followedByAny(B).followedBy(C)

seq: a1, b1, b2, b3, c1

aftermatch strategy: skip_to_next

Potential matches (a1, b1, c1) (a1, b2, c1) (a1, b3, c1) reach final state at the same time and have the same priority, but (a1, b1, c1) is the first one in the queue, thus (a1, b2, c1) and (a1, b3, c1) will be dropped by skip_to_next strategy.

If it's by-design, I guess it depends on two things:
 * take must be the first transition for every state, if exists
 * priority queue is first-in-first-out for items with same priority

  was:
When a pattern produces several matches with same priority, is it the expected behavior to keep only the first dequeued one?

E.G.

pattern: A.followedByAny(B).followedBy(C)

seq: a1, b1, b2, b3, c1

aftermatch strategy: skip_to_next

Potential matches (a1, b1, c1) (a1, b2, c1) (a1, b3, c1) reach final state at the same time and have the same priority, but (a1, b1, c1) is the first one in the queue, thus (a1, b2, c1) and (a1, b3, c1) will be dropped by skip_to_next strategy.


> Expected prune behavior for matches with same priority
> ------------------------------------------------------
>
>                 Key: FLINK-30069
>                 URL: https://issues.apache.org/jira/browse/FLINK-30069
>             Project: Flink
>          Issue Type: Bug
>          Components: Library / CEP
>            Reporter: Juntao Hu
>            Priority: Major
>
> When a pattern produces several matches with same priority, is it the expected behavior to keep only the first dequeued one?
> E.G.
> pattern: A.followedByAny(B).followedBy(C)
> seq: a1, b1, b2, b3, c1
> aftermatch strategy: skip_to_next
> Potential matches (a1, b1, c1) (a1, b2, c1) (a1, b3, c1) reach final state at the same time and have the same priority, but (a1, b1, c1) is the first one in the queue, thus (a1, b2, c1) and (a1, b3, c1) will be dropped by skip_to_next strategy.
> If it's by-design, I guess it depends on two things:
>  * take must be the first transition for every state, if exists
>  * priority queue is first-in-first-out for items with same priority



--
This message was sent by Atlassian Jira
(v8.20.10#820010)