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

Benjamin Lerer commented on CASSANDRA-12149:
--------------------------------------------

Thanks for the patch.
I wonder if the {{TokenFilter::hasBound}} and {{TokenFilter::isInclusive}} 
methods should not be updated in a similar way. They are not called if 
{{isOnToken}} is {{false}} but I believe that it will make the code more bullet 
proof.

The {{TokenFilter::bound}} method can be simplified to:
{code}
return isOnToken() ? tokenRestriction.bounds(bound, options) : 
restrictions.bounds(bound, options);
{code}

> NullPointerException on SELECT using index with token restrictions fully 
> overriden by other PK restrictions 
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12149
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12149
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Andrey Konstantinov
>            Assignee: Alex Petrov
>         Attachments: CASSANDRA-12149.txt
>
>
> If I execute the sequence of queries (see the attached file), Cassandra 
> aborts a connection reporting NPE on server side. SELECT query without token 
> range filter works, but does not work when token range filter is specified. 
> My intent was to issue multiple SELECT queries targeting the same single 
> partition, filtered by a column indexed by SASI, partitioning results by 
> different token ranges.
> Output from cqlsh on SELECT is the following:
> {code}
> cqlsh> SELECT namespace, entity, timestamp, feature1, feature2 FROM 
> mykeyspace.myrecordtable WHERE namespace = 'ns2' AND entity = 'entity2' AND 
> feature1 > 11 AND feature1 < 31  AND token(namespace, entity) <= 
> 9223372036854775807;
> ServerError: <ErrorMessage code=0000 [Server error] 
> message="java.lang.NullPointerException">
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to