Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6935 Integration of SQL and CEP
  3. FLINK-7169

Support AFTER MATCH SKIP function in CEP library API

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • Library / CEP
    • None

    Description

      In order to support Oracle's MATCH_RECOGNIZE on top of the CEP library, we need to support AFTER MATCH SKIP function in CEP API.

      There're four options in AFTER MATCH SKIP, listed as follows:
      1. AFTER MATCH SKIP TO NEXT ROW: resume pattern matching at the row after the first row of the current match.
      2. AFTER MATCH SKIP PAST LAST ROW: resume pattern matching at the next row after the last row of the current match.
      3. AFTER MATCH SKIP TO FIST RPV: resume pattern matching at the first row that is mapped to the row pattern variable RPV.
      4. AFTER MATCH SKIP TO LAST RPV: resume pattern matching at the last row that is mapped to the row pattern variable RPV.

      I think we can introduce a new function to `CEP` class, which takes a new parameter as AfterMatchSKipStrategy.

      The new API may looks like this

      public static <T> PatternStream<T> pattern(DataStream<T> input, Pattern<T, ?> pattern, AfterMatchSkipStrategy afterMatchSkipStrategy) 
      

      We can also make `SKIP TO NEXT ROW` as the default option, because that's what CEP library behaves currently.

      Attachments

        Issue Links

          Activity

            People

              ychen Yueting Chen
              ychen Yueting Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: