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

cql3 doesn't support multiple clauses on primary key components

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.2
    • None
    • None
    • Normal

    Description

      In trying to write a dtest for CASSANDRA-5225, I noticed that given a table such as:

      CREATE TABLE foo (
        key text,
        c text,
        v text,
        PRIMARY KEY (key, c)
      )
      

      It is possible to slice the values of 1 or 2 for c:

      select c from foo where key = 'foo' and c > '0' and c < '3';
      

      However, there is no way to get these explicitly by name, even though it should be possible:

      cqlsh:Keyspace1> select c from foo where key = 'foo' and c in ('1', '2');
      Bad Request: PRIMARY KEY part c cannot be restricted by IN relation
      

      Attachments

        1. 5230.patch
          3 kB
          Sylvain Lebresne

        Issue Links

          Activity

            People

              slebresne Sylvain Lebresne
              brandon.williams Brandon Williams
              Sylvain Lebresne
              Jonathan Ellis
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: