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

!= returns incorrect result in sub-query (select * from b0 where field != (select...)))

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Critical
    • 4.0.0
    • 4.0.0
    • query
    • Security Level: Public
    • dev 07/04
    • Untriaged
    • Unknown

    Description

      Create two buckets b0 and b1 with primary indexes defined using gsi.

      In each bucket ass 3 documents with (key, value) pairs defined as follows

      "1":

      { "id": "1", "int_field1": 1 }

      "2":

      { "id": "2", "int_field1": 2 }

      "3":

      { "id": "3", "int_field1": 3 }

      The following sub-query based N1QL Stmt returns incorrect results

      select * from b0 where TO_ARRAY(int_field) != (array c.int_field for c in (select int_field from b1 US}
      {
      "requestID": "c55d9a23-9b77-401d-8d5a-c2c86ba15f7c",
      "signature":

      { "*": "*" }

      ,
      "results": [
      {
      "b0":

      { "id": "3", "int_field": 3 }

      }
      ],
      "status": "success",
      "metrics":

      { "elapsedTime": "16.565313ms", "executionTime": "16.428324ms", "resultCount": 1, "resultSize": 103 }

      Missing json document

      { "id": "1", "int_field": 1 }

      Attachments

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

        Activity

          People

            keshav Keshav Murthy
            parag Parag Agarwal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty