Wail Y. Alkowaileet created ASTERIXDB-3312:
----------------------------------------------

             Summary: Query fails on standalone collection with composite 
nested primary key with column storage
                 Key: ASTERIXDB-3312
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3312
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: STO - Storage
    Affects Versions: 0.9.9
            Reporter: Wail Y. Alkowaileet
            Assignee: Wail Y. Alkowaileet
             Fix For: 0.9.9


Following are the set of statements to reproduce the issue.
{noformat}create collection users if not exists primary key (my_id: int, 
address.city:string, name.first: string, name.last:string) WITH 
{"storage-format": {"format": "column"}};

INSERT INTO users([
{"my_id": 1, "address":{"city": "C1"}, "name":{"first": "F1", "last": "L1"}},
{"my_id": 2, "address":{"city": "C2"}, "name":{"first": "F2", "last": "L1"}},
{"my_id": 3, "address":{"city": "C3"}, "name":{"first": "F1", "last": "L2"}}
]);

select address, name
from test.users d
where d.my_id=2
order by name.first;{noformat}
As reported by [~peeyushgupta1] 

The issue here is that the columnar LSM cursor will try to match the predicate 
with all the primary keys (PKs). However, as in the query above, the number of 
PKs are greater than the predicate (d.my_id = 2). Hence, we get 
IndexOutOfBoundException.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to