You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (Jira)" <ji...@apache.org> on 2021/09/06 13:41:00 UTC

[jira] [Comment Edited] (CASSANDRA-14344) Support filtering using IN restrictions

    [ https://issues.apache.org/jira/browse/CASSANDRA-14344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401731#comment-17401731 ] 

Benjamin Lerer edited comment on CASSANDRA-14344 at 9/6/21, 1:40 PM:
---------------------------------------------------------------------

[~n.v.harikrishna] I rebased your patch and modified it a bit to allow {{IN}} filtering on all types of columns (partition key, clustering, regular and static columns) not only on clustering columns. I also added support for multi-column {{IN}} restrictions with a single column. I hope it is fine with you.
|| Branch || CircleCi ||
| [trunk|https://github.com/apache/cassandra/pull/1159] | [j8|https://app.circleci.com/pipelines/github/blerer/cassandra/199/workflows/8862efff-0c6a-40a1-818c-0468db38d28b], [j11|https://app.circleci.com/pipelines/github/blerer/cassandra/199/workflows/77349b59-4baf-467f-90bc-8811b207323b]|
    


was (Author: blerer):
[~n.v.harikrishna] I rebased your patch and modified it a bit to allow {{IN}} filtering on all types of columns (partition key, clustering, regular and static columns) not only on clustering columns. I also added support for multi-column {{IN}} restrictions with a single column. I hope it is fine with you.
|| Branch || CircleCi ||
| [trunk|https://github.com/apache/cassandra/pull/1159] | [j8|https://app.circleci.com/pipelines/github/blerer/cassandra/189/workflows/7735aea2-e12b-436e-9280-bf41d5501589], [j11|https://app.circleci.com/pipelines/github/blerer/cassandra/189/workflows/63daa4fc-e553-45f1-93bf-db5223c8b806]|
    

> Support filtering using IN restrictions
> ---------------------------------------
>
>                 Key: CASSANDRA-14344
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14344
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Legacy/CQL
>            Reporter: Dikang Gu
>            Assignee: Venkata Harikrishna Nukala
>            Priority: Normal
>             Fix For: 4.x
>
>         Attachments: 14344-trunk-2.txt, 14344-trunk-3.patch, 14344-trunk-inexpression-approach-2.txt, 14344-trunk-inexpression-approach.txt, 14344-trunk.txt
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
>               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;
>  *{color:#ff0000}InvalidRequest: Error from server: code=2200 [Invalid query] message="IN restrictions are not supported on indexed columns"{color}*
>  cqlsh:ks1>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org