Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-39466

Query: window functions, incorrect and confusing error message

    XMLWordPrintable

Details

    • Untriaged
    • Centos 64-bit
    • 1
    • Unknown

    Description

      Build 7.0.0-1902

      Running the following query:

      select stddev_pop ( decimal_field1 ) over( order by decimal_field1 , char_field1 range between unbounded preceding and 2 following ) as wf from bucket_01 where primary_key_id is not null
      

      produces the following error message:

      [
       {
       "code": 3220,
       "msg": "STDDEV_POP window function multiple ORDER BY terms are not allowed.",
       "query": "select stddev_pop ( decimal_field1 ) over( order by decimal_field1 , char_field1 range between unbounded preceding and 2 following ) as wf from bucket_01 where primary_key_id is not null"
       }
      ]

      This error is incorrect and confusing since stddev_pop allows to have multiple ORDER BY terms, but RANGE instruction does not support multiple ORDER BY terms.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kamini.jagtiani Kamini Jagtiani
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty