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

Inconsistent results executing prepared statements with star expressions in projection

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes

    Description

      When the encoded plan of a statement containing path.* expressions in the projection, is unmarshalled and then executed - wrong results ( missing fields in result entries ) can be observed.
       
      Repro:
       
      1. Setup 2 node cluster with Query, Index, Data service.
      2. 

      INSERT INTO default VALUES
      (
      "key::1", { "type": "document", "id": 1 }),
      ("key::2", { "type": "document", "id": 2 }),
      ("key::3", { "type": "document", "name": "Raj", "timezone": "Local", "id": 3 }
      ); 

       
      3. 

      prepare prep1 as select d.* from default as d ORDER BY id; 

       
      4. Execute the prepared statement on both query nodes. On one query node the last document will have missing fields. This is incorrect.
       

      [
          {
              "id": 1,
              "type": "document"
          },
          {
              "id": 2,
              "type": "document"
          },
          {
              "id": 3,
              "type": "document"
          }
      ] 

      Issue:
       

      Attachments

        Issue Links

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

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              dhanya.gowrish Dhanya Gowrish
              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