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

Correct the documentation of MATCH_RECOGNIZE

    XMLWordPrintableJSON

    Details

      Description

      Regarding to the following example in the doc:

      SELECT *
      FROM Ticker
          MATCH_RECOGNIZE (
              PARTITION BY symbol
              ORDER BY rowtime
              MEASURES
                  FIRST(A.rowtime) AS start_tstamp,
                  LAST(A.rowtime) AS end_tstamp,
                  AVG(A.price) AS avgPrice
              ONE ROW PER MATCH
              AFTER MATCH SKIP TO FIRST B
              PATTERN (A+ B)
              DEFINE
                  A AS AVG(A.price) < 15
          ) MR;
      

      Given the inputs shown in the doc, it should be:

       symbol       start_tstamp       end_tstamp          avgPrice
      =========  ==================  ==================  ============
      ACME       01-APR-11 10:00:00  01-APR-11 10:00:03     14.5

      instead of:

       symbol       start_tstamp       end_tstamp          avgPrice
      =========  ==================  ==================  ============
      ACME       01-APR-11 10:00:00  01-APR-11 10:00:03     14.5
      ACME       01-APR-11 10:00:04  01-APR-11 10:00:09     13.5
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dian.fu Dian Fu
                Reporter:
                dian.fu Dian Fu
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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