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

[BP to 6.0.2] - Partition UnnestScan should not use DISTINCT index aggregation (wrong results)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.0.2
    • 5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 6.0.1
    • query
    • None
    • Untriaged
    • Unknown

    Description

      CREATE INDEX ix1 ON default( DISTINCT a1) PARTITION BY HASH(META().id);
      SELECT COUNT (DISTINCT ua)
      FROM default AS d
      UNNEST d.a1 AS ua
      WHERE ua IS NOT NULL;
      

      As Index is partition by META().id.
      The same value of index keys are spread across different partitions.
      As partition keys are not part of group keys Indexer can't determine DISTINCT values
      so DISTINCT aggreagtes can't be pushed to indexer.

      Attachments

        Issue Links

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

          Activity

            People

              ajay.bhullar Ajay Bhullar
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty