[ 
https://issues.apache.org/jira/browse/ASTERIXDB-3284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17793097#comment-17793097
 ] 

ASF subversion and git services commented on ASTERIXDB-3284:
------------------------------------------------------------

Commit 08b9cdb0cf6ef9eaaa3ee44fff08c4c2022b8ef7 in asterixdb's branch 
refs/heads/master from Peeyush Gupta
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=08b9cdb0cf ]

[MULTIPLE ISSUES][COMP] Multiple array index fixes

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
Fixes ASTERIXDB-3284 and ASTERIXDB-3285.
In the upsert pipeline, warning is returned instead of an error
when the indexed field is not an array. Elements of the
array having type different then the indexed type are not inserted
in the index. For the bulk load pipeline, on type mismatch the
index creation fails.

Change-Id: Icb7dd9ec54b4cf77963172adc93ed93704a2455d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17987
Integration-Tests: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Peeyush Gupta <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>


> 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
>            Assignee: Glenn Justo Galvizo
>            Priority: Major
>              Labels: triaged
>             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)

Reply via email to