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

REGEXP_REPLACE is not accepting 4th param as int rather the signature accepts 4th param as string.

    XMLWordPrintable

Details

    • Untriaged
    • No

    Description

      CBAS Query(It works fine in N1QL): REGEXP_REPLACE('abc@couchbase.com','e','a',2)
      result:

      [
        {
          "code": 1,
          "msg": "ASX1002: Type mismatch: function regexp-replace expects its 4th input parameter to be type string, but the actual input type is bigint",
          "query_from_user": "select REGEXP_REPLACE('abc@couchbase.com','e','a',2) as mail;"
        }
      ]
      

      If the above query is modified to:

      select REGEXP_REPLACE('abc@couchbaseeeeee.com','e','a','2') as mail;

      it works but the result is incorrect:

      [
        {
          "mail": "abc@couchbasaaaaaa.com"
        }
      ]
      

      Attachments

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

        Activity

          People

            dmitry.lychagin Dmitry Lychagin (Inactive)
            ritesh.agarwal Ritesh Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty