Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.0
-
None
-
Untriaged
-
1
-
Unknown
Description
The problem exist from 4.6.0 ( the way we index array index key if the value is scalar is not right). This exposed with implicit array covering.
insert into default values ("k01",{"arr1":"hello"}); |
create index ix20 on default (ALL arr1); |
select meta().id FROM default WHERE ANY v IN arr1 SATISFIES v = "hello" END; |
select meta(d).id FROM default AS d UNNEST d.arr1 AS v WHERE v = "hello"; |
Above 2 queries gives one result instead of zero. If the query uses non covering index it returns correct results.
The reason is index has Array index key ALL arr1, arr1 is scalar.
The way we index/scan must change to fix this or disable implicit array index covering.
Attachments
Issue Links
- relates to
-
MB-38287 non leading array index MISSING can give wrong results
- Resolved