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

Error message is misleading for analytics subquery if outer query is missing Alias

    XMLWordPrintable

Details

    • Untriaged
    • Centos 64-bit
    • No
    • CX Sprint 112

    Description

      select * from ds where gender IN (select distinct RAW gender from ds)
      

      Running the above query returns the below error on Analytics workbench.

      "msg": "Type mismatch: function scan-collection expects its 1st input parameter to be type multiset or array, but the actual input type is object
      

      But the actual problem was missing Alias for outer query.

      select * from ds d where d.gender IN (select RAW gender from ds limit 1)
      

      In case of N1QL the error we get if Alias is missing is "Duplicate subquery alias default". 

      Attachments

        Issue Links

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

          Activity

            People

              dmitry.lychagin Dmitry Lychagin (Inactive)
              tanzeem.ahmed Tanzeem Ahmed (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty