Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.1.0, 7.2.0
-
Security Level: Public
-
Untriaged
-
0
-
Unknown
Description
Found by Bingjie Miao
CREATE INDEX ix20 ON default (DISTINCT ARRAY FLATTEN_KEYS(v) FOR v IN a1 END); |
UPSERT INTO default VALUES("k01", {"c1":10, "a1": [1,2,3]}); |
SELECT META(d).id
|
FROM default d |
WHERE ANY v IN a1 SATISFIES abs(v) = 3 END; |
Due to false positives and Distinct scan rows eliminated
We should apply filter on indexScan or disable covering
Issue | Resolution |
Covering FLATTEN_KEYS() on an array index generated incorrect results. This was because a modified version of the ANY clause was applied after the index which meant false positives were retained and Distinct scan rows were eliminated. | The ANY filter is now applied on an index scan itself when covering an index scan with flatten keys. |