CQL: Unable to Null Validation in the Where Section

Try returning all rows where a particular field is null or not null.

select * from ADDRESS where addr1 = null; 

or

 select * from ADDRESS where addr1 = 'NULL'; 

addr1 can be a logical or text field.

I tried != null , is null , <> null and isnull(addr1, 'NULL')

but i get

 no viable alternative at input '=' 

or

 no index columns present in by-columns clause with "equals' operator" 

Using Cassandra 1.1.1 and Java 1.7_05

+6
source share
1 answer

CQL has no NULL concept (still CASSANDRA-3783 ). The right thing instead depends on your specific situation.

+6
source

Source: https://habr.com/ru/post/922071/


All Articles