cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick McFadin (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5457) Ordering is ignored when using 'CLUSTERING ORDER BY'
Date Thu, 11 Apr 2013 21:43:16 GMT
Patrick McFadin created CASSANDRA-5457:
------------------------------------------

             Summary: Ordering is ignored when using 'CLUSTERING ORDER BY' 
                 Key: CASSANDRA-5457
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5457
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.4
            Reporter: Patrick McFadin


Creating the following table:

create table reverse_sort_test (
	id int,
	field1 int,
	field2 int
	PRIMARY KEY (id, field1, field2)
) WITH CLUSTERING ORDER BY (field1 DESC);

I would expect field1 to be reverse ordered. 

Inserting this data:

insert into reverse_sort_test (id,field1,field2) values (1,1,1);
insert into reverse_sort_test (id,field1,field2) values (3,3,3);
insert into reverse_sort_test (id,field1,field2) values (2,2,2);
insert into reverse_sort_test (id,field1,field2) values (4,4,4);
insert into reverse_sort_test (id,field1,field2) values (6,6,6);
insert into reverse_sort_test (id,field1,field2) values (5,5,5);

And running a select:

select * from reverse_sort_test;

 id | field1 | field2
----+--------+--------
  5 |      5 |      5
  1 |      1 |      1
  2 |      2 |      2
  4 |      4 |      4
  6 |      6 |      6
  3 |      3 |      3

The order looks random.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message