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

[BP to 7.2.1 MB-56088] - Advised statement gives syntax error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.2.1
    • Morpheus, 7.1.4, 7.2.0
    • query
    • Security Level: Public
    • Untriaged
    • 0
    • Unknown

    Description

      SELECT d.c3
          FROM default AS d
          UNNEST d.a1 AS a
          UNNEST OBJECT_VALUES(a.o) AS b
          WHERE d.c2 BETWEEN 10 AND 20 AND d.c1 = 10;

      Try following combinations

       

      AND a.x = 10
      AND a.x = 10 AND a.y =20
      AND b.x = 10
      AND b.x = 10 AND b.y =20
      AND a.x = 10 AND b.y =20
      AND b = 30
      

       

       

       Starts with _ALL

      CREATE INDEX adv_ALL_a1_object_values_a_o_c1_c2 ON `default`(_ALL ARRAY (ALL ARRAY `b` FOR b IN object_values((`a`.`o`)) END) FOR a IN `a1` END,`c1`,`c2`)

       

      Issue Resolution
      An ADVISE statement with multiple levels of UNNEST caused a syntax error in the CREATE INDEX statement from the Index Advisor. ADVISE has been improved when there are queries with multiple levels of UNNEST.

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            bingjie.miao Bingjie Miao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty