You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jeremiah Jordan (JIRA)" <ji...@apache.org> on 2014/07/10 22:11:05 UTC

[jira] [Commented] (CASSANDRA-6960) Cassandra requires ALLOW FILTERING for a range scan

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

Jeremiah Jordan commented on CASSANDRA-6960:
--------------------------------------------

It needs allow filtering, but do we do the same optimizations for reading the rows to check for the columns as we would if the partition key were supplied?

> Cassandra requires ALLOW FILTERING for a range scan
> ---------------------------------------------------
>
>                 Key: CASSANDRA-6960
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6960
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: J.B. Langston
>
> Given this table definition:
> {code}
> CREATE TABLE metric_log_a (
>   destination_id text,
>   rate_plan_id int,
>   metric_name text,
>   extraction_date 'org.apache.cassandra.db.marshal.TimestampType',
>   metric_value text,
>   PRIMARY KEY (destination_id, rate_plan_id, metric_name, extraction_date)
> );
> {code}
> It seems that Cassandra should be able to perform the following query without ALLOW FILTERING:
> {code}
> select destination_id, rate_plan_id, metric_name, extraction_date, metric_value 
> from metric_log_a 
> where token(destination_id) > ? 
> and token(destination_id) <= ? 
> and rate_plan_id=90 
> and metric_name='minutesOfUse' 
> and extraction_date >= '2014-03-05' 
> and extraction_date <= '2014-03-05' 
> allow filtering;
> {code}
> However, it will refuse to run unless ALLOW FILTERING is specified.



--
This message was sent by Atlassian JIRA
(v6.2#6252)