You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Alex Petrov (JIRA)" <ji...@apache.org> on 2016/03/09 15:30:41 UTC
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on
clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15187154#comment-15187154 ]
Alex Petrov edited comment on CASSANDRA-11310 at 3/9/16 2:30 PM:
-----------------------------------------------------------------
I hope I'm not bugging you with questions too much.
It looks like it all requires changes to {MultiCBuilder}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`.
Thank you for your help.
was (Author: ifesdjeen):
I hope I'm not bugging you with questions too much.
It looks like it all requires changes to `MultiCBuilder`, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`.
Thank you for your help.
> 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
> Labels: doc-impacting
> 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)