Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.9
Description
The following example shows that array index has invalid entries when documents has an indexed field of a different type than the one used to create the index.
drop dataverse test if exists; create dataverse test; use test; CREATE TYPE dsType AS OPEN {id:int}; CREATE DATASET ds1(dsType) primary key id; CREATE INDEX i2 ON ds1(UNNEST b SELECT x : int) EXCLUDE UNKNOWN KEY; UPSERT INTO ds1 {"id": 5, "a": ["hello"], "b": [{"x":1}]}; UPSERT INTO ds1 {"id": 6, "a": ["hello"], "b": [{"x":"aa"}]}; SET `import-private-functions` `true`; FROM DUMP_INDEX("test", "ds1", "i2") AS v SELECT VALUE v ORDER BY v.values;
The output shows invalid entries
{ "values": [ 1, 5 ] } { "values": [ 171524930624552960, 7023095185408 ] }