cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11031) MultiTenant : support “ALLOW FILTERING" for Partition Key
Date Sun, 21 Aug 2016 13:37:20 GMT


Alex Petrov commented on CASSANDRA-11031:

[~blerer] I haven't made any code chances since the last submission, just fixed / improved
dtest suite. Now, all tests pass. If you could take a look, it'd be great. I haven't squashed
commits just in case you'd like to see the history. 

To roughly describe what I've done: 
  * short-circuited the PK & Static column queries in {{RowFilter}}, made sure that checks
for PK and static column expressions are done once only
  * changed logic in {{processPartitionKeyRestrictions}}, hopefully making all cases more

The rest is just minor adjustments.


> MultiTenant : support “ALLOW FILTERING" for Partition Key
> ---------------------------------------------------------
>                 Key: CASSANDRA-11031
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: CQL
>            Reporter: ZhaoYang
>            Assignee: ZhaoYang
>            Priority: Minor
>             Fix For: 3.x
> Currently, Allow Filtering only works for secondary Index column or clustering columns.
And it's slow, because Cassandra will read all data from SSTABLE from hard-disk to memory
to filter.
> But we can support allow filtering on Partition Key, as far as I know, Partition Key
is in memory, so we can easily filter them, and then read required data from SSTable.
> This will similar to "Select * from table" which scan through entire cluster.
> CREATE TABLE multi_tenant_table (
> 	tenant_id text,
> 	pk2 text,
> 	c1 text,
> 	c2 text,
> 	v1 text,
> 	v2 text,
> 	PRIMARY KEY ((tenant_id,pk2),c1,c2)
> ) ;
> Select * from multi_tenant_table where tenant_id = "datastax" allow filtering;

This message was sent by Atlassian JIRA

View raw message