cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
Date Wed, 23 Mar 2016 16:46:25 GMT


Alex Petrov commented on CASSANDRA-11310:

I hope this time it should be a bit better. 

Unfortunately, making a {{useFiltering}} boolean variable similar to {{usesSecondaryIndexing}}
would mean splitting some logic within {{StatementRestrictions::needFiltering}} into several
places and adding several iterations (for example check for whether clustering columns cause
indexing and whether adding the contains restriction would cause filtering).

Although other than that  - there was one redundant check (for {{usesSecondaryIndexing ||
clusteringColumnRestrictions}} that already happens in {{processClusteringColumnRestrictions}}).
Clustering column restrictions are added without influencing indexing flag now, as {{needFiltering}}
is now on {{ClusteringColumnRestrictions}}.

I've added test covering {{ORDER}}, {{COMPACT}}, {{static}} columns, overall in/across partitions,
with different combinations of slices, with frozen collections in PK.
New branch is here:

Thank you.

> Allow filtering on clustering columns for queries without secondary indexes
> ---------------------------------------------------------------------------
>                 Key: CASSANDRA-11310
>                 URL:
>             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
> 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
> {code}

This message was sent by Atlassian JIRA

View raw message