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

Create collection throws error but creates an empty collection

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      1. The below query throws the following error but creates an empty collection named col2.

      Create collection col2 primary key (movie_id : uuid) as SELECT m._id AS movie_id, m.title AS movie_title, COUNT(c._id)AS num_comments FROM movies m LEFT JOIN comments c ON m._id = c.movie_id GROUP BY m._id, m.title ORDER BY num_comments DESC;

      error:

      [ { "code":23069, "msg":"Field type object cannot be promoted to type uuid" } ]

       
      2. The below query throws the following error but creates an empty collection named col4.
       

      Create collection col4 primary key (movie_id : String) as SELECT m._id AS movie_id, m.title AS movie_title, COUNT(c._id)AS num_comments FROM movies m LEFT JOIN comments c ON m._id = c.movie_id GROUP BY m._id, m.title ORDER BY num_comments DESC;

      error:

      [ { "code":23069, "msg":"Field type object cannot be promoted to type string" } ]

      Data:
      comments collection
      movies collection

      Attachments

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

        Activity

          People

            peeyush.gupta Peeyush Gupta
            janhavi.tripurwar Janhavi Tripurwar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty