Peeyush Gupta created ASTERIXDB-3284:
----------------------------------------
Summary: Invalid entries in array index
Key: ASTERIXDB-3284
URL: https://issues.apache.org/jira/browse/ASTERIXDB-3284
Project: Apache AsterixDB
Issue Type: Bug
Components: IDX - Indexes
Affects Versions: 0.9.9
Reporter: Peeyush Gupta
Fix For: 0.9.9
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.
{code:java}
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; {code}
The output shows invalid entries
{code:java}
{ "values": [ 1, 5 ] }
{ "values": [ 171524930624552960, 7023095185408 ] } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)