Details
-
Bug
-
Resolution: Fixed
-
Major
-
Morpheus, 7.1.4, 7.1.0, 7.2.0
-
Untriaged
-
0
-
Yes
Description
UPSERT INTO default VALUES ("f01",{"a1":[ {"f1":1}, {"f1":1}]});
|
|
CREATE INDEX ix30 ON default (ALL ARRAY v1.f1 FOR v1 IN a1 END);
|
SELECT d.a1
|
FROM default AS d
|
UNNEST d.a1 AS v1
|
WHERE v1.f1 = 1;
|
Above query should not cover using implicit array index because it projecting d.a1
This may be regression of MB-32506
https://github.com/couchbase/query/blob/master/planner/build_scan_unnest_cov.go#L115
We should remove this and check here if present ihttps://github.com/couchbase/query/blob/master/planner/build_scan_unnest_cov.go#L129 like 6.x
Issue | Resolution |
Under certain circumstances, a query with UNNEST used a covering index scan and incorrect results were returned. Reference to the UNNEST expression should have prevented the covering index from being used for the query as the index did not contain the entire array. | The logic to determine covering UNNEST scans has been changed to not use a covering index scan for such queries. |