Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16011

Normalize the within usage in Pattern

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      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:

      1. 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.
      2. Pattern.begin("a").followedBy("b").within(t2) will use t2 as the window time.
      3. But Pattern.begin("a").within(t1).followedBy("b") will have no window time
      4. 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

          Activity

            People

            • Assignee:
              tiemsn shuai.xu
              Reporter:
              tiemsn shuai.xu

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m

                  Issue deployment