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

[CX] Error msg:Cannot resolve ambiguous alias reference for undefined identifier tasks_points with aggregate functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • CBAS DP
    • analytics
    • analytics version:193, 5.5.0-1686
    • Triaged
    • Centos 64-bit
    • Unknown

    Description

      Query issued:
      SELECT tasks_points.task1 AS task from default_shadow WHERE join_mo>7 GROUP BY tasks_points.task1 HAVING COUNT(tasks_points.task1) > 0 AND (MIN(join_day)=1 OR MAX(join_yr=2011)) ORDER BY tasks_points.task1;

      Above query works well in n1ql.

      For analytics it gives error:
      "msg": "Cannot resolve ambiguous alias reference for undefined identifier tasks_points"

      Query works well for n1ql.

      Document:
      {
      "tasks_points":

      { "task1": 2, "task2": 1 }

      ,
      "name": "employee-9",
      "mutated": 0,
      "skills": [
      "skill2010",
      "skill2011"
      ],
      "join_day": 9,
      "join_mo": 10,
      "email": "9-mail@couchbase.com",
      "test_rate": 10.1,
      "join_yr": 2011,
      "_id": "query-testemployee10153.1877827-1",
      "VMs": [

      { "RAM": 10, "os": "ubuntu", "name": "vm_10", "memory": 10 }

      ,

      { "RAM": 10, "os": "windows", "name": "vm_11", "memory": 10 }

      ],
      "job_title": "Engineer"
      }

      Attachments

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

        Activity

          People

            ritesh.agarwal Ritesh Agarwal
            Prerna.Manaktala Prerna Manaktala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty