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

querying secondary index using complete collection should warn/error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0.10, 2.1.1
    • Feature/2i Index
    • cassandra 2.1.0-rc2, java 1.7.0_60

    • Normal

    Description

      Cassandra does not seem to support querying a set literal like so:

      select * from testtable where pkey='foo' and mycollection = {'one', 'two'};
      

      We currently don't let the user know this query is problematic, rather we just return no rows.

      To reproduce:

      create keyspace test with replication = {'class': 'SimpleStrategy', 'replication_factor':1} ;
      
      use test ;
      
      create table testtable (pkey text PRIMARY KEY, mycollection set<text>);
      
      create index on testtable (mycollection);
      
      insert into testtable (pkey, mycollection) VALUES ( 'foo', {'one','two'};
      
      cqlsh:test> select * from testtable where pkey='foo' and mycollection = {'one', 'two'};
      
      (0 rows)
      

      Attachments

        1. 7506.txt
          3 kB
          Tom Hobbs
        2. 7506-2.0.txt
          1 kB
          Tom Hobbs
        3. 7506-v2.txt
          5 kB
          Tom Hobbs
        4. 7506-v3.txt
          5 kB
          Tom Hobbs

        Activity

          People

            thobbs Tom Hobbs
            rhatch Russ Hatch
            Tom Hobbs
            Sylvain Lebresne
            Russ Hatch Russ Hatch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: