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

[N1QL] test_join_unnest_alias_covering fails

    XMLWordPrintable

Details

    • Untriaged
    • No

    Description

      Index created:
      CREATE INDEX `idx` ON `default`((all (array (`x`.`RAM`) for `x` within `VMs` end)),`VMs`)

      Query issued:
      explain SELECT x FROM default emp1 USE INDEX(idx) UNNEST emp1.VMs as x JOIN default task ON KEYS meta(`emp1`).id where x.RAM > 1 and x.RAM < 5 ;

      Plan:

      [
        {
          "plan": {
            "#operator": "Sequence",
            "~children": [
              {
                "#operator": "DistinctScan",
                "scan": {
                  "#operator": "IndexScan",
                  "index": "idx",
                  "index_id": "3a45a780c8b7d7dc",
                  "keyspace": "default",
                  "namespace": "default",
                  "spans": [
                    {
                      "Exact": true,
                      "Range": {
                        "High": [
                          "5"
                        ],
                        "Inclusion": 0,
                        "Low": [
                          "1"
                        ]
                      }
                    }
                  ],
                  "using": "gsi"
                }
              },
              {
                "#operator": "Fetch",
                "as": "emp1",
                "keyspace": "default",
                "namespace": "default"
              },
              {
                "#operator": "Parallel",
                "~child": {
                  "#operator": "Sequence",
                  "~children": [
                    {
                      "#operator": "Unnest",
                      "as": "x",
                      "expr": "(`emp1`.`VMs`)"
                    }
                  ]
                }
              },
              {
                "#operator": "Join",
                "as": "task",
                "keyspace": "default",
                "namespace": "default",
                "on_keys": "(meta(`emp1`).`id`)"
              },
              {
                "#operator": "Parallel",
                "~child": {
                  "#operator": "Sequence",
                  "~children": [
                    {
                      "#operator": "Filter",
                      "condition": "((1 < (`x`.`RAM`)) and ((`x`.`RAM`) < 5))"
                    },
                    {
                      "#operator": "InitialProject",
                      "result_terms": [
                        {
                          "expr": "`x`"
                        }
                      ]
                    },
                    {
                      "#operator": "FinalProject"
                    }
                  ]
                }
              }
            ]
          },
          "text": "SELECT x FROM default emp1 USE INDEX(idx)  UNNEST emp1.VMs as x  JOIN default task ON KEYS meta(`emp1`).id where  x.RAM > 1 and x.RAM < 5  ;"
        }
      ]
      

      The plan has been using covers for previous builds.
      Assert which fails in the test:
      https://github.com/couchbase/testrunner/blob/master/pytests/tuqquery/tuq_2i_index.py#L2139

      Attachments

        Issue Links

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

          Activity

            People

              Prerna.Manaktala Prerna Manaktala (Inactive)
              Prerna.Manaktala Prerna Manaktala (Inactive)
              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