Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.9.0
Description
In CEP, we can use Pattern.within() to set a window in which the pattern should be matched. However, the usage of within is ambiguous and confusing to user.
For example:
- Pattern.begin("a").within(t1).followedBy("b").within(t2) will use the minimal of t1 and t2 as the window time for the whole pattern.
- Pattern.begin("a").followedBy("b").within(t2) will use t2 as the window time.
- But Pattern.begin("a").within(t1).followedBy("b") will have no window time
- While Pattern.begin("a").notFollowedBy("not").within(t1).followedBy("b").within(t2) will use t2 as the window time.
So I propose to normalize the usage of within() and make strict checking when compiling the pattern.
For example, we can only allow within() at the end of the pattern and point it out if user set it somewhere else when compiling the pattern.
Attachments
Issue Links
- relates to
-
FLINK-13881 CEP within method should applied in every independent pattern
- Open
- links to