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

[CX] Wrong result returned when a secondary index with optional field is used

    XMLWordPrintable

Details

    • Untriaged
    • Unknown
    • CX Sprint 190

    Description

      To reproduce execute the following:

      CREATE DATASET breweries ON `beer-sample`
      WHERE `type` = "brewery";
       
      create index country_missing_idx on breweries(country:string, some_missing_field:string);
      

      The following query will return a wrong result of 0 matching documents because it is using the index:

      select count(*) from breweries bw
      where bw.country = 'United States';
      

      If you drop the index, you should get the correct result of 875.

      Attachments

        Issue Links

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

          Activity

            People

              dmitry.lychagin Dmitry Lychagin (Inactive)
              murtadha.hubail Murtadha Hubail
              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