cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Katsutoshi Nagaoka <nagapad.0...@gmail.com>
Subject select query returns wrong value if use DESC option
Date Thu, 13 Mar 2014 10:27:42 GMT
Hi.

I am using Cassandra 2.0.6 version. There is a case that select query
returns wrong value if use DESC option. My test procedure is as follows:

------------------
cqlsh:test> CREATE TABLE mytable (key int, range int, PRIMARY KEY (key,
range));
cqlsh:test> INSERT INTO mytable (key, range) VALUES (0, 0);
cqlsh:test> SELECT * FROM mytable WHERE key = 0 AND range = 0;

     key | range
    -----+-------
       0 |     0

    (1 rows)

cqlsh:test> SELECT * FROM mytable WHERE key = 0 AND range = 0 ORDER BY
range ASC;

     key | range
    -----+-------
       0 |     0

    (1 rows)

cqlsh:test> SELECT * FROM mytable WHERE key = 0 AND range = 0 ORDER BY
range DESC;

    (0 rows)
------------------

Why returns value is 0 rows if using DESC option? I expected the same 1 row
as the return value of other queries. Does anyone has a similar issue?

Thanks,
Katsutoshi

Mime
View raw message