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

NTILE must return an error when parameter is not stable

    XMLWordPrintable

    Details

    • Sprint:
      10.2.6-2, 10.2.6-3

      Description

      Ntile must only work for deterministic cases.

      If we have a query such as

      select ntile( n ) over (partition by c1 order by c2):
      

      n must provide a stable value for every individual partition, or we should return an error.

      Currently we compute

       ntile(<current_value_of_n>) 

      , given the current row number in the partition. This leads to erroneous results.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anel Anel Husakovic
              Reporter:
              cvicentiu Vicențiu Ciorbaru
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: