Scenario (running 3.9, by the way):

CREATE TABLE atc_test1.idxtest (
    pk text PRIMARY KEY,
    col1 text,
    col2 text);
CREATE CUSTOM INDEX idx2 ON atc_test1.idxtest (col2) USING
'org.apache.cassandra.index.sasi.SASIIndex';
CREATE INDEX idx1 ON atc_test1.idxtest (col1);

Queries:

Works: select * from idxtest where col1='asdf';
Works: select * from idxtest where col2='asdf';

Does not work: select * from idxtest where col1='asdf' and col2='asdf'
allow filtering;

Cassandra logs the following:
java.lang.ClassCastException:
org.apache.cassandra.index.internal.composites.RegularColumnIndex cannot be
cast to org.apache.cassandra.index.sasi.SASIIndex

I'm guessing the takeaway is that once you go SASI you're committed to only
SASI?  Unfortunately - in our case - the non-SASI index is in place because
one can't do a SASI index on a map column.

Questions:

Anyone else encounter this?  Any workarounds you're willing to share?

Seems like throwing a runtime exception is not a terrific way of handling
this... makes me wonder if there's something amiss with my particular
instance/config or if this is simply the way it is...

Reply via email to