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

Distinguish between keyspaces at FROM level and subquery

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • feature-backlog
    • 5.0.0
    • query
    • 4.5.0-2601

    Description

      I see difference in the result of a subquery on n1ql vs sql with same alias in outer and inner subquery for the same bucket/table name.
       
      SELECT * FROM  default  t_1   WHERE   int_field1  NOT IN (SELECT * FROM  default  t_1   WHERE    
      ((t_1.bool_field1 AND t_1.decimal_field1 <= 4953)));
       
      This query uses the same alias in outer and inner subquery , hence it gives this result for n1ql:
          "msg": "Duplicate subquery alias t_1",
       
      But for sql the same query works. SQL checks for duplicate alias inside the same subquery but n1ql enforces it in outer and inner subquery.
      
      

      Attachments

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

        Activity

          People

            korrigan.clark Korrigan Clark (Inactive)
            Prerna.Manaktala Prerna Manaktala (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