title: Use IN in any column in a Cassandra Table
body: <p>I want to be able to use <code>IN</code> in any column in any order in Cassandra</p>
  <p>So I have the next table:</p>
  <pre><code>CREATE TABLE test (a TEXT, b TEXT, c TEXT, PRIMARY KEY (a, b, c));
  </code></pre>
  <p>and this data:</p>
  <pre><code>INSERT INTO test (a, b, c) VALUES ('a1', 'b1', 'c1');
  INSERT INTO test (a, b, c) VALUES ('a2', 'b2', 'c2');
  </code></pre>
  <p>This query works:</p>
  <pre><code>SELECT * FROM test WHERE c IN ('c1', 'c2') AND b IN ('b1') ALLOW FILTERING;
  </code></pre>
  <p>But if you remove the <code>b IN</code> it gives this error:</p>
  <pre><code>SELECT * FROM test WHERE c IN ('c1', 'c2') ALLOW FILTERING;
  InvalidRequest: Error from server: code=2200 [Invalid query] message=&quot;IN 
  restrictions are not supported on indexed columns&quot;
  </code></pre>
  <p>Seems like if I want to use <code>IN</code> in a column I should have used <code>IN</code> in some previous columns?</p>
  <p>Is there a way to avoid this?</p>
  <p>Modifying the Schema is <code>valid</code> but I need to use Cassandra and allow filtering through any columns (if there's no need to filter thought a columns then there would be no <code>IN</code> clause for that column).</p>
  <p>Thanks for reading.</p>
  <br>
  <br>
  <p>P.S: I know you are not supposed to use <code>ALLOW FILTERING</code> please assume there's no other way.</p>
  <p>Edit: Seems like they may have fixed this?: <a href="https://issues.apache.org/jira/browse/CASSANDRA-14344" rel="nofollow noreferrer">https://issues.apache.org/jira/browse/CASSANDRA-14344</a></p>