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

Join-related field name ambiguity could have a better error message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • Morpheus
    • 7.1.0
    • analytics
    • 1

    Description

      Here is a join query against a pair of related tabular views in Neo:

      SET `sql_compat` "true";
      SELECT *
      FROM breweries_v bw, beers_v br
      WHERE br.brewery_id = bw.bw_id
      ORDER BY br.brewery_id
      LIMIT 10;

      Here is the error message caused by the two views sharing a field name:

      [
       

      {     "code": 24161,     "msg": "Ambiguous projection in SELECT clause (in line 2, at column 8)",     "query_from_user": "SET `sql_compat` \"true\";\nSELECT *\nFROM breweries_v bw, beers_v br\nWHERE br.brewery_id = bw.bw_id\nORDER BY br.brewery_id\nLIMIT 10;"   }

      ]

      It would be nice/helpful from a UE perspective - since the compiler clearly knows there's an ambiguity - to TELL the user what the offending field name(s) is (are).  

      Attachments

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

        Activity

          People

            ali.alsuliman Ali Alsuliman
            mike.carey Mike Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty