Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10879

Window Functions final ordering of result set

Details

    Description

      When running the following query:

      select pk, a, d, sum(d) over (partition by a order by pk desc ROWS between 1 preceding and current row) as sum_d from t1;
      

      We get results ordered by (a, pk), not ordered by (a, pk desc). The window function values are computed according to the descending ordering, but the results end up printed as (a, pk). This can be confusing to the end user. How do we deal with this use case and others like it?

      Attachments

        Activity

          cvicentiu Vicențiu Ciorbaru created issue -
          cvicentiu Vicențiu Ciorbaru made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          cvicentiu Vicențiu Ciorbaru made changes -
          Affects Version/s 10.2 [ 14601 ]
          Issue Type Bug [ 1 ] Task [ 3 ]
          cvicentiu Vicențiu Ciorbaru made changes -
          Fix Version/s 10.2.19 [ 23207 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 77199 ] MariaDB v4 [ 132956 ]

          People

            cvicentiu Vicențiu Ciorbaru
            cvicentiu Vicențiu Ciorbaru
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.