[
https://issues.apache.org/jira/browse/FLINK-16011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Till Rohrmann reassigned FLINK-16011:
-------------------------------------
Assignee: shuai.xu
> Normalize the within usage in Pattern
> -------------------------------------
>
> Key: FLINK-16011
> URL: https://issues.apache.org/jira/browse/FLINK-16011
> Project: Flink
> Issue Type: Improvement
> Components: Library / CEP
> Affects Versions: 1.9.0
> Reporter: shuai.xu
> Assignee: shuai.xu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)