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

Vincent White commented on CASSANDRA-15500:
-------------------------------------------

That's correct, it does appear to just be an issue with the outputting of the 
CQL string  in 
{{org.apache.cassandra.db.filter.ClusteringIndexNamesFilter#toCQLString}} where 
we're running afoul of
{code:java}
clusterings.size() <= 1
{code}
since the {{clusterings.size()}} for this type of query will be 1.
 Haven't had a chance to look any further but there is a short note about the 
original addition of this check here:
 
https://issues.apache.org/jira/browse/CASSANDRA-7392?focusedCommentId=14877285&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14877285

> only partition key push down when multiple cluster keys restricted in where 
> clause
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15500
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: onmstester
>            Priority: Normal
>
> Using Apache Cassandra 3.11.2, defined a table like this:
>  
> _create table my_table(_
>                  __                   _partition text,_
>        __                   _clustering1 int,_
>                   _clustering2 text,_
>                   _data set<text>,_
>                 **                _*primary key (partition, clustering1, 
> clustering2))*_
>  
> and configured slow queries threshold to 1ms in yaml to see how queries 
> passed to cassandra. Query below:
>  
> _select * from my_table where partition='a' and clustering1= 1 and 
> clustering2='b'_
>  
> would be like this in debug.log of cassandra:
>  
> _select * from my_table where partition='a' LIMIT 100>  (it means that the 
> two cluster key restriction did not push down to storage engine and the whole 
> partition been retrieved)_
>  
> but this query:
>  
> _select * from my_table where partition='a' and clustering1= 1_
>  
> _would be_
>  
> _select * from my_table where partition='a' and_ _clustering1= 1_ _LIMIT 100> 
> (single cluster key been pushed down to storage engine)_
>  
>  
> _So it seems to me that, we could not restrict multiple clustering keys in 
> select because it would retrieve the whole partition ?!_



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

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

Reply via email to