Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4193

Parse the "window" keyword for agg and nonagg function in mysql8

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 1.8.0.Alpha1
    • None
    • mysql-connector
    • None
    • False
    • False

    Description

      Support the following mysql8 statement:

      SELECT id,
      SUM(bin_volume) OVER w AS bin_volume_o,
      LAG(bin_volume) OVER w AS bin_volume_l,
      LAG(bin_volume, 2) OVER w AS bin_volume_l2,
      FIRST_VALUE(id) OVER w2 AS fv,
      GROUP_CONCAT(bin_volume order by id) AS `rank`
      FROM table1
      WINDOW w AS (PARTITION BY id, bin_volume ORDER BY id ROWS UNBOUNDED PRECEDING), w2 AS (PARTITION BY id, bin_volume ORDER BY id DESC ROWS 10 PRECEDING)

      and support to parse lag/lead with multiple parameters

      [LEAD({{expr [, N[, _{{default}}_]])}}|https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_lead] [_{{null_treatment}}_] over_clause

      [LAG(expr [, N[, }}{{default}}{{]])|https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_lag] [__{{null_treatment}}__] over_clause{{}}

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ywyuewei Harvey Yue
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: