cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Mirwaldt <>
Subject Contains-query leads to error when list in selected row is empty
Date Wed, 28 Sep 2016 17:28:17 GMT
Hi Cassandra-users,
my name is Michael Mirwaldt and I work for

I have encountered this problem with Cassandra 3.7 running 4 nodes:

Given the data model

CREATE KEYSPACE mykeyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'2'}  AND durable_writes = true;

CREATE TABLE mykeyspace.mytable (partitionkey text, mylist list<text>, PRIMARY KEY (partitionkey));

If I add the value

INSERT INTO mykeyspace.mytable(partitionkey,mylist) VALUES('A',['1']);

and query

select * from mykeyspace.mytable;

I get

partitionkey | mylist
            A |  ['1']

and If I query

select * from mykeyspace.mytable where partitionkey='A' and mylist contains '1' allow filtering;

I get

partitionkey | mylist
            A |  ['1']

But if I add

INSERT INTO mykeyspace.mytable(partitionkey) VALUES('B');

so that

select * from mykeyspace.mytable;

gives me

partitionkey | mylist
            B |   null
            A |  ['1']


select * from mykeyspace.mytable where partitionkey='B' and mylist contains '2' allow filtering;

leads to the error message

ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation failed - received
0 responses and 2 failures" info={'failures': 2, 'received_responses': 0, 'required_responses':
1, 'consistency': 'ONE'}

with the log message

[...] AwareExecutorService$|Uncaught exception on thread Thread[SharedPool-Worker-2,5,main]:
java.lang.RuntimeException: java.lang.NullPointerException

on one other node.

Is that really logical and intended?
Would you not expect an empty result for last query?

I am confused.
Can you help me?


________________________________ AG

Munich Head Office/Hauptsitz M?nchen: Georg-Muche-Stra?e 3 | 80807 Munich | Germany | Tel.
+49 89 318528-0 | Google Maps:
Frankfurt Branch Office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327
Frankfurt am Main | Germany | Google Maps:
Management Board/Vorstand: Dr. Steffen Boehnert | Dr. Alexis Eisenhofer | Dr. Yann Samson
Supervisory Board/Aufsichtsrat: Werner Engelhardt (Chairman/Vorsitzender), Eric Wasescha (Deputy
Chairman/Stellv. Vorsitzender), Franz Baur
Register Court/Handelsregister: Munich - HRB 128972 | Sales Tax ID Number/St.Nr.: DE205370553

View raw message