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

nested UnnestScan gives wrong results when clause is present

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 6.0.1, 6.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

       
      INSERT INTO `default` ( KEY, VALUE ) VALUES( "id1A", { "type":"TYPEA", "subId":"id1", "valueA": [ { "cId" : "c1", "valueB": [ { "valueC": "testValueA" } ] }, { "cId" : "c2", "valueB": [ { "valueC": "testValueB" } ] } ] });
      CREATE INDEX `ix20` ON `default` (
        ALL (ARRAY (
          ALL ( ARRAY var2.`valueC` FOR var2 IN var1.`valueB`
                END))
          FOR `var1` IN `valueA`
          WHEN `var1`.`cId` = "c1" END), `subId`)
      WHERE `type` = "TYPEA";
       
      SELECT var2.valueC FROM default AS a
      UNNEST a.valueA var1
      UNNEST var1.valueB var2
      WHERE a.type = "TYPEA"
      AND var1.cId = "c1"
      AND var2.valueC = "testValueA"
      LIMIT 1;
      

      Above query is covered , but there is no Cover around var1.cId also it is not there in FilterCovers
      This result in wrong results

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-33485
          # Subject Branch Project Status CR V

          Activity

            People

              mihir.kamdar Mihir Kamdar (Inactive)
              Sitaram.Vemulapalli Sitaram Vemulapalli
              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