Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2633

match_recognize all rows per match return type bug

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.16.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:

      JDK 8,Calcite 1.6.0

      Description

      When using sql  match recognize with flink cep ,something seems strange。

      SELECT * FROM Ticker

      MATCH_RECOGNIZE (    

            ORDER BY proctime    

             MEASURES           

                  FIRST(DOWN.tstamp) AS top_tstamp,           

                  LAST(DOWN.tstamp) AS bottom_tstamp           

             ALL ROWs PER MATCH           

            AFTER MATCH SKIP PAST LAST ROW     

             PATTERN (DOWN{2,} LAST)     

             DEFINE          

                  DOWN AS DOWN.price < PREV(DOWN.price) or PREV(DOWN.price) IS NULL,          

                   LAST AS true)

      AS T

      With "AlLL ROWS PER MATCH",the result has 4 columns,the proctime is the first column.But with "ONE ROW PER MATCH",the result has 3 columns, and the proctime is not in the result set.

      Is this a bug?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ffjl1985 Fei Feng
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: