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

IN on the last clustering columns + ORDER BY DESC yield no results

Agile BoardAttach 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
    • Low
    • Resolution: Fixed
    • 1.2.16, 2.0.6
    • None
    • None
    • Low

    Description

      That's not a very common mix but well, the following return no results which is obviously bogus:

      CREATE TABLE test (k int, c1 int, c2 int, PRIMARY KEY (k, c1, c2));
      INSERT INTO test(k, c1, c2) VALUES (0, 0, 0);
      INSERT INTO test(k, c1, c2) VALUES (0, 0, 1);
      INSERT INTO test(k, c1, c2) VALUES (0, 0, 2);
      SELECT * FROM test WHERE k=0 AND c1 = 0 AND c2 IN (2, 0) ORDER BY c1 DESC
      

      Note: it's pretty useless to order on a column which has an equal restriction, and that's probably why nobody ran into this yet, but that's really just due to a minor typo so there is no reason not to fix.

      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
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment