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

CQL3 should not allow ranges on the partition key without the token() method, even for byte ordered partitioner.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.6
    • None
    • None
    • Normal

    Description

      When the partition is an ordered one, CQL3 currently allows non-equal conditions on the partition key directly. I.e. we allow

      CREATE TABLE t (k timeuuid PRIMARY KEY);
      SELECT * FROM t WHERE k > ... AND k < ...;
      

      but this is a bug because even ordered partitioner don't order following the type of the partition key. They order by bytes, always.

      So that type of query doesn't do in general what it is supposed to do and we should disallow it. Even for ordered partitioner, the token() function should be used.

      Attachments

        1. 5666.txt
          4 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: