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.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment