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

Secondary index query fails with tc range query when ordered by DESC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0.8
    • Feature/2i Index
    • None
    • Normal

    Description

      create table test4 ( name text, lname text, tc bigint, record text, PRIMARY KEY ((name, lname), tc)) WITH CLUSTERING ORDER BY (tc DESC) AND compaction=

      {'class': 'LeveledCompactionStrategy'}

      ;

      create index test4_index ON test4(lname);

      Populate it with some data and non-zero tc values, then try:

      select * from test4 where lname='blah' and tc>0 allow filtering;

      And, (0 rows) returned, even though there are rows which should be found.

      When I create the table using CLUSTERING ORDER BY (tc ASC), the above query works. Rows are correctly returned based on the range check.

      Tried various combinations but with descending order on tc nothing works.

      Attachments

        1. 6950-pycassa-repro.py
          1 kB
          Tom Hobbs
        2. 6950.txt
          2 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            acampeau Andre Campeau
            Sylvain Lebresne
            Tom Hobbs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: