Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
5.0.0
-
None
-
5.0.0-2827
-
Untriaged
-
Unknown
Description
Related to MB-19887. In a comment on MB-19887 sitaram gave this scenario:
insert into default values ('k01',{'x':10})
insert into default values("k02", {"x": 20, "y": 20})
insert into default values("k03", {"x": 30, "z": 30})
insert into default values("k04", {"x": 40, "y": 40, "z": 40})
create index iv1 on default(x,y,z) using view
select x,y,z from default use index(iv1 using view) where x is not missing
This yields these incorrect results using view:
{"x": 10},
{"x": 20,"y": 20},
{"x": 30},<- this is missing z:30
{"x": 40,"y": 40,"z": 40}
The results are correct when using gsi:
create index iv2 on default(x,y,z) using gsi
select x,y,z from default use index(iv2 using gsi) where x is not missing
{"x": 10},
{"x": 20,"y": 20},
{"x": 30,"z": 30},
{"x": 40,"y": 40,"z": 40}