You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Naresh Yadav <ny...@gmail.com> on 2014/01/16 14:11:15 UTC

Getting indexoutbound exception for a specific query on cassandra trunk

I had taken latest source code of cassandra trunk to evaluate performance
of indexing on collections new feature(
https://issues.apache.org/jira/browse/CASSANDRA-4511) for my usecase..

IF you configure table like this with commands in given order :

CREATE TABLE testcollectionindex(userid text, timeunitid text, periodid
text, periodlabel text, periodtags text, unit text, datatags text,
datatagsset set<text>,value double,PRIMARY KEY((unit,periodid), datatags));

INSERT INTO testcollectionindex(periodlabel, datatags, datatagsset,
value,timeunitid,periodid, unit) VALUES('Feb-2010', 'India|Pen|Store1',
{'India', 'Pen', 'Store1'}, 10,'Month','Period2','Number');

CREATE INDEX testcollectionindexdatatagsset ON testcollectionindex
(datatagsset);

SELECT * FROM testcollectionindex WHERE datatagsset CONTAINS 'Store1';
Output ( works perfectly ):
 unit   |     periodid |     datatags         | datatagsset
| periodlabel
--------+----------+------------------+----------------------------+-------------
 Number |  Period2 | India|Pen|Store1 | {'India', 'Pen', 'Store1'} |
Feb-2010

(1 rows)

*SELECT * FROM testcollectionindex WHERE periodid='Period2' AND
unit='Number' AND datatagsset CONTAINS 'Store1';*

THIS QUERY DO NOT WORK..I get RPC timeout error and server logs showing
indexoutofbound exception (http://pastebin.com/f7qmRc0R)

Deugging code for this query I get SliceQueryFilter [reversed=false,
slices=[[, ]], count=2147483647, toGroup = 1] because of that it throws
java.lang.ArrayIndexOutOfBoundsException: 0    in
CompositesIndexOnCollectionKey.java method makeIndexColumnNameBuilder()

Note : I also tested this query on 03-Dec-2013 source code snapshot of
cassandra getting same exception there also

please someone help me on this so that i can proceed on this and conclude
on this new supported feature of cassandra.

Thanks
Naresh