CQL:Unable to Null签入“Where”条款 [英] CQL: Unable to Null Check in "Where" Clause

查看:157
本文介绍了CQL:Unable to Null签入“Where”条款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试返回特定字段为null或不为null的所有行。

Try to return all rows where a specific field is null or not null.

select * from ADDRESS where addr1 = null;  

select * from ADDRESS where addr1 = 'NULL';  

addr1可以是布尔或文本字段。

addr1 can be a boolean or text field.

我尝试过!= null 为null < null isnull(addr1,'NULL')

/ p>

but I get

no viable alternative at input '='

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

使用Cassandra 1.1.1& Java 1.7_05

Using Cassandra 1.1.1 & Java 1.7_05

推荐答案

CQL没有NULL的概念(尚未见 CASSANDRA-3783 )。正确的事情取决于您的具体情况。

CQL doesn't have the concept of NULL (yet- see CASSANDRA-3783). The right thing to do instead depends on your particular situation.

这篇关于CQL:Unable to Null签入“Where”条款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆