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

Support filtering using IN restrictions

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.1-alpha1, 4.1
    • Legacy/CQL
    • 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-3.patch
          10 kB
          n.v.harikrishna
        2. 14344-trunk-inexpression-approach-2.txt
          18 kB
          n.v.harikrishna
        3. 14344-trunk-inexpression-approach.txt
          14 kB
          n.v.harikrishna
        4. 14344-trunk-2.txt
          9 kB
          n.v.harikrishna
        5. 14344-trunk.txt
          6 kB
          n.v.harikrishna

        Activity

          People

            n.v.harikrishna n.v.harikrishna
            dikanggu Dikang Gu
            n.v.harikrishna
            Andres de la Peña, Benjamin Lerer
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h