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

Analytics throws an error if LET variable is queried with any other field.

    XMLWordPrintable

Details

    • Untriaged
    • No
    • CX Sprint 143, CX Sprint 144, CX Sprint 145, CX Sprint 146, CX Sprint 147

    Description

      Query:

      select join_date date, `type` from default_ds let join_date = tostr(1233) || '-' || tostr(11);
      

      Result:

      [
        {
          "code": 1,
          "msg": "Cannot resolve ambiguous alias reference for undefined identifier type in [$join_date, $default_ds]",
          "query_from_user": "select join_date date, `type` from default_ds let join_date = tostr(1233) || '-' || tostr(11);"
        }
      ]
      

      While this query works fine:

      select join_date date from default_ds let join_date = tostr(1233) || '-' || tostr(11);
      

      Result:

      [
        {
          "date": "1233-11"
        },
        {
          "date": "1233-11"
        }
      ]
      

      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