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

returning array from N1QL JS function fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 6.5.0
    • eventing
    • Untriaged
    • Unknown

    Description

      Load JS functions using attached script.

      Run these statements:

      create function firstElem(a) language javascript as { "math", "firstElem" }
      create function restArr(a) language javascript as { "math", "restArr" }
      select firstElem([0, "foo", true]), restArr([0, "foo", true])
      

      This produces an error in the third statemen:

      {
          "code": 5010,
          "msg": "Error evaluating projection. - cause: Error executing function restArr (math:restArr): json: cannot unmarshal array into Go value of type map[string]interface {} - cause: json: cannot unmarshal array into Go value of type map[string]interface {}"
        }
      

      Attachments

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

        Activity

          People

            Gautham.Banasandra Gautham Banasandra (Inactive)
            johan.larson Johan Larson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty