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

Support filtering using IN restrictions

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Patch Available
    • Priority: Normal
    • Resolution: Unresolved
    • Fix Version/s: 4.x
    • Component/s: Legacy/CQL
    • Labels:
      None

      Description

      Support IN filter query like this:

       
      CREATE TABLE ks1.t1 (
          key int,
          col1 int,
          col2 int,
          value int,
          PRIMARY KEY (key, col1, col2)
      ) WITH CLUSTERING ORDER BY (col1 ASC, col2 ASC)
       
      cqlsh:ks1> select * from t1 where key = 1 and col2 in (1) allow filtering;
       
       key | col1 | col2 | value
      ------------+------
         1 |    1 |    1 |     1
         1 |    2 |    1 |     3
       
      (2 rows)
      cqlsh:ks1> select * from t1 where key = 1 and col2 in (1, 2) allow filtering;
      InvalidRequest: Error from server: code=2200 [Invalid query] message="IN restrictions are not supported on indexed columns"
      cqlsh:ks1>

        Attachments

        1. 14344-trunk.txt
          6 kB
          Venkata Harikrishna Nukala
        2. 14344-trunk-2.txt
          9 kB
          Venkata Harikrishna Nukala
        3. 14344-trunk-3.patch
          10 kB
          Venkata Harikrishna Nukala
        4. 14344-trunk-inexpression-approach.txt
          14 kB
          Venkata Harikrishna Nukala
        5. 14344-trunk-inexpression-approach-2.txt
          18 kB
          Venkata Harikrishna Nukala

          Activity

            People

            • Assignee:
              n.v.harikrishna Venkata Harikrishna Nukala
              Reporter:
              dikanggu Dikang Gu
              Authors:
              Venkata Harikrishna Nukala
              Reviewers:
              Benjamin Lerer
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: