Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10879 Window Functions final ordering of result set
  3. MDEV-12779

Oracle/DB2 Compatibility Implicit Ordering for ROW_NUMBER OVER

    XMLWordPrintable

Details

    Description

      Feature request for Oracle/DB2 migration compatibility:

      We are using the window function "ROW_NUMBER() OVER()" to generate the row sequence number required for pagination across the pages. For example:

      SELECT ROW_NUMBER() OVER() as RN, COL1, COL2 FROM MYTABLE;
      

      Since there is no expression given in the OVER() clause, DB2 will just assign sequential numbers to the output. The column RN returned from the query will have numbers in perfect order.

      However, MariaDB does not guarantee the numbers in order without an explicit ORDER BY.

      This will require query re-writing in order to migrate.

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              ccalender Chris Calender (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.