cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Morris <>
Subject CQL results are confusing me
Date Mon, 20 Aug 2012 17:20:40 GMT
Consider the following statements

#1 New family is created so I have no data
create columnfamily Test (UserName varchar primary key, EmailAddress

#2 Count how many rows I have
select count(1) from Test;
-Expected: 0
-Actual: 0

#3 Select all users with a specific email address
select * from Test where EmailAddress = 'x';
-Expected: Zero rows
-Actual: Bad Request: No indexed columns present in by-columns clause with
"equals" operator

#4 Select all users with a specific user name (primary key)
select * from Test where UserName = 'x';
-Expected: Zero rows
-Actual: 1 row with 1 column 'UserName' = 'x';

I am simply trying to determine if a user already exists with a specific
email address or with a specific user name.  Item #4 is the most confusing,
what is going on?

View raw message