Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4760

CQL3 equality is broken when using composites and clustering order by

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Duplicate
    • Fix Version/s: 1.1.6
    • Component/s: None
    • Labels:
      None
    • Severity:
      Normal

      Description

      The following query is broken when you specify the second order by

      cqlsh:dev> DROP TABLE testrev ;
      cqlsh:dev> CREATE TABLE testrev (
             ...          key text,
             ...          rdate timestamp,
             ...          rdate2 timestamp,
             ...          num double,
             ...          PRIMARY KEY(key,rdate,rdate2)
             ...          ) WITH COMPACT STORAGE
             ...          AND CLUSTERING ORDER BY(rdate DESC, rdate2 DESC);
      cqlsh:dev> INSERT INTO testrev(key,rdate,rdate2,num) VALUES ('foo','2012-01-01','2012-01-01',10.5);
      cqlsh:dev> select * from testrev where key='foo' and rdate = '2012-01-01';
      Bad Request: Range finish must come after start in traversal order
      Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
      cqlsh:dev> 
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tjake T Jake Luciani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: