namhnguyen / asterixdb

Automatically exported from code.google.com/p/asterixdb
0 stars 0 forks source link

After creating an index on a field, = query operator generates this error - Index: 1, Size: 1 [IndexOutOfBoundsException] #788

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Please repeat the steps in the example dataverse case - TinySocial - on the 
AsterixDB 101 (http://asterixdb.ics.uci.edu/documentation/aql/primer.html) to 
create the dataverse and load the data.

2. After loading the sample data, please enter the following AQL to reproduce 
the error.

use dataverse TinySocial;
create index fbUser_alias_keyword_Idx on FacebookUsers(alias) type keyword;

for $user in dataset FacebookUsers
where $user.alias = 'Isbel'
return $user;

What is the expected output? What do you see instead?
The expected output - { "id": 2, "alias": "Isbel", "name": "IsbelDull", 
"user-since": datetime("2011-01-22T10:10:00.000Z"), "friend-ids": {{ 1, 4 }}, 
"employment": [ { "organization-name": "Hexviafind", "start-date": 
date("2010-04-27"), "end-date": null } ] }

Instead, I see this error - Index: 1, Size: 1 [IndexOutOfBoundsException].

What version of the product are you using? On what operating system?
Asterix Beta Release 0.8.5 on Ubuntu 12.04

Please provide any additional information below.

Original issue reported on code.google.com by wangs...@gmail.com on 27 Jun 2014 at 6:09

GoogleCodeExporter commented 9 years ago
Still, this problem can be reproduced in the master. I will look into the error 
if some one can not investigate the problem now. 

Original comment by wangs...@gmail.com on 30 Jul 2014 at 5:35

GoogleCodeExporter commented 9 years ago

Original comment by wangs...@gmail.com on 31 Jul 2014 at 12:29

GoogleCodeExporter commented 9 years ago
Fixed. The reason was that a mismatch between the chosen index access method by 
the optimizer and the index type can happen. For example, in this case, the 
optimizer chose BTressAccessMethod on the inverted index (keyword or ngram 
type).  

Now, when the optimizer converts a select operator pattern to an index-search, 
it tries to match the selected access method type and the chosen index type 
(e.g. BTreeAccessMethod to a BTree index)

Original comment by wangs...@gmail.com on 5 Aug 2014 at 6:17