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

OBJECT_PARIS() creates JOSN document filed as "value" and not able to select that field.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 5.0.0
    • 5.0.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      If i use back-tilt it works. If this okay you can close this Issue.

       
      create primary index on default;
      insert into default values ("k01",{"x":1});
      select object_pairs(default) from default;
      {
          "requestID": "f926e118-8ea9-4b6c-94df-ef0bbb9f5862",
          "signature": {
              "$1": "array"
          },
          "results": [
              {
                  "$1": [
                      {
                          "name": "x",
                          "value": 1
                      }
                  ]
              }
          ],
          "status": "success",
          "metrics": {
              "elapsedTime": "7.332213ms",
              "executionTime": "7.285327ms",
              "resultCount": 1,
              "resultSize": 145
          }
      }
       
       
      select object_pairs(default)[0].value from default;
      {
          "requestID": "44c05d1a-b52b-456e-bf77-e4d37a5bc8b6",
          "errors": [
              {
                  "code": 3000,
                  "msg": "syntax error - at value"
              }
          ],
          "status": "fatal",
          "metrics": {
              "elapsedTime": "586.214µs",
              "executionTime": "559.253µs",
              "resultCount": 0,
              "resultSize": 0,
              "errorCount": 1
          }
      }
      
      

      Attachments

        Issue Links

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

          Activity

            People

              keshav Keshav Murthy
              Sitaram.Vemulapalli Sitaram Vemulapalli
              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