cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Srini (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-13187) Allow Filtering on Cluster Key columns while Partition Key is given
Date Tue, 07 Feb 2017 01:57:41 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-13187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Srini updated CASSANDRA-13187:
------------------------------
    Description: 
create table table1 (
      k_part_one text,
      k_part_two int,
      k_clust_one text,
      k_clust_two int,
      k_clust_three uuid,
      data1 text,
      data2 text,
      PRIMARY KEY((k_part_one,k_part_two), k_clust_one, k_clust_two, k_clust_three)      
  );

select k_clust_one, k_clust_three , data1 
from table1  where k_part_one = ‘xxxxx’ and k_part_two = yyyy  and k_clust_two = xxxx
allow filtering;

Allow filtering works on non primary key columns but it doesn't work on clustering key columns
for a given partition key. The above example  skipped k_clust_one and thus gives an error.

InvalidRequest: Error from server: code=2200 [Invalid query] message="PRIMARY KEY column "k_clust_two"
cannot be restricted as preceding column "k_clust_one" is not restricted"

This is very similar to CASSANDRA-6377, CASSANDRA-11310, CASSANDRA -10715. Yet, this is still
unresolved.

This is very critical use case, where we want to avoid sending entire wide row to the client
and do filtering locally. It is an unnecessary network hog that needs be avoided by doing
the filtering on the actual Cassandra node.

Please note that there is no secondary index on this column family.. 



  was:
create table table1 (
      k_part_one text,
      k_part_two int,
      k_clust_one text,
      k_clust_two int,
      k_clust_three uuid,
      data1 text,
      data2 text,
      PRIMARY KEY((k_part_one,k_part_two), k_clust_one, k_clust_two, k_clust_three)      
  );

select k_clust_one, k_clust_three , data1 
from table1  where k_part_one = ‘xxxxx’ and k_part_two = ‘yyyy’  and k_clust_two =
‘xxxx’ allow filtering;

Allow filtering works on non primary key columns but it doesn't work on clustering key columns
for a given partition key. The above example  skipped k_clust_one and thus gives an error.

This is very similar to CASSANDRA-6377, CASSANDRA-11310, CASSANDRA -10715. Yet, this is still
unresolved.

This is very critical use case, where we want to avoid sending entire wide row to the client
and do filtering locally. It is an unnecessary network hog that needs be avoided by doing
the filtering on the actual Cassandra node.

Please note that there is no secondary index on this column family.. 




> Allow Filtering on Cluster Key columns while Partition Key is given
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-13187
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13187
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Srini
>             Fix For: 3.10
>
>
> create table table1 (
>       k_part_one text,
>       k_part_two int,
>       k_clust_one text,
>       k_clust_two int,
>       k_clust_three uuid,
>       data1 text,
>       data2 text,
>       PRIMARY KEY((k_part_one,k_part_two), k_clust_one, k_clust_two, k_clust_three) 
    
>   );
> select k_clust_one, k_clust_three , data1 
> from table1  where k_part_one = ‘xxxxx’ and k_part_two = yyyy  and k_clust_two =
xxxx allow filtering;
> Allow filtering works on non primary key columns but it doesn't work on clustering key
columns for a given partition key. The above example  skipped k_clust_one and thus gives an
error.
> InvalidRequest: Error from server: code=2200 [Invalid query] message="PRIMARY KEY column
"k_clust_two" cannot be restricted as preceding column "k_clust_one" is not restricted"
> This is very similar to CASSANDRA-6377, CASSANDRA-11310, CASSANDRA -10715. Yet, this
is still unresolved.
> This is very critical use case, where we want to avoid sending entire wide row to the
client and do filtering locally. It is an unnecessary network hog that needs be avoided by
doing the filtering on the actual Cassandra node.
> Please note that there is no secondary index on this column family.. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message