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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 1.2.6
    • Component/s: None
    • Labels:
      None
    • Severity:
      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

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              slebresne Sylvain Lebresne
              Authors:
              Sylvain Lebresne
              Reviewers:
              Jonathan Ellis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: