[
https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15182948#comment-15182948
]
Benjamin Lerer commented on CASSANDRA-11310:
--------------------------------------------
:-)
A couple of hints:
I believe that the 2 main problems are the validation in
{{StatementRestrictions::processClusteringColumnsRestrictions}} and the way the
{{Clustering}} and {{Slice.Bound}} sets are build in
{{PrimaryKeyRestrictionSet::valuesAsClustering}} and
{{PrimaryKeyRestrictionSet::boundsAsClustering}} methods.
The unit test for filtering on non-primary key columns are located in
{{SelectTest}} and the DTests for testing filtering with paging are in
{{paging.py}}.
This change should also makes queries like: {{SELECT * FROM emp_table2 WHERE
(b_yr, b_mon) > ('2015', 'oct') AND b_day ='01' ALLOW FILTERING}} fully valid.
It will be great if you could also provide some test for that kind of query.
If you need some help do not hesitate to ping me.
> Allow filtering on clustering columns for queries without secondary indexes
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-11310
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11310
> Project: Cassandra
> Issue Type: Improvement
> Components: CQL
> Reporter: Benjamin Lerer
> Assignee: Alex Petrov
> Fix For: 3.x
>
>
> Since CASSANDRA-6377 queries without index filtering non-primary key columns
> are fully supported.
> It makes sense to also support filtering on clustering-columns.
> {code}
> CREATE TABLE emp_table2 (
> empID int,
> firstname text,
> lastname text,
> b_mon text,
> b_day text,
> b_yr text,
> PRIMARY KEY (empID, b_yr, b_mon, b_day));
> SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2
> WHERE b_mon='oct' ALLOW FILTERING;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)