cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Czech <e...@nextbigsound.com>
Subject odd CQL behavior
Date Thu, 03 May 2012 17:46:11 GMT
I can't believe I have to ask this but I have a CF with about 10 rows and
the keys are literally 1 through 9.

Why does this not work if I want the row where the key is ascii('5')?

cqlsh:Keyspace1>  select first 1 * from CF where key = '5';
 KEY
-----
  05

* I saw the Jira about the sort of phantom row with no values so I know why
that's there

Listing the keys shows something like this:

cqlsh:Keyspace1> select key from CF ;
 key
------
   33
   36
   35
   38
   32
   31
   39
   34
   37

If I prepend a '3' to my key queries it works but I can't possibly see why
I would have to do that.

cqlsh:Keyspace1>   select first 1 * from CF  where key = '35';
( Returns the right rows for key '5')


Changing the validator appears to make no material difference beyond the
key listing:

cqlsh:Keyspace1> assume CF(key) values are text;
cqlsh:Keyspace1> select key from CF ;
 key
-----
   3
   6
   5
   8
   2
   1
   9
   4
   7

cqlsh:Keyspace1>  select first 1 * from CF where key = '5';
 KEY
-----
  05


What's going on here?

Mime
View raw message