cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Johnston (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6151) CqlPagingRecorderReader Used when Partition Key Is Explicitly Stated
Date Wed, 16 Oct 2013 21:38:49 GMT


Chad Johnston commented on CASSANDRA-6151:

For what it's worth, our use case involves looking up data mostly by {{occurday}}, since we're
partitioning by day. Leaving off {{seqnumber}} from the query isn't allowed, hence my example
of a single value. In reality, we'd really want to use {{IN()}} for {{seqnumber}} but that
fails as well.

> CqlPagingRecorderReader Used when Partition Key Is Explicitly Stated
> --------------------------------------------------------------------
>                 Key: CASSANDRA-6151
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>            Reporter: Russell Alexander Spitzer
>            Assignee: Alex Liu
>            Priority: Minor
> From
> The user was attempting to load a single partition using a where clause in a pig load
> CQL Table
> {code}
> CREATE table data (
>   occurday  text,
>   seqnumber int,
>   occurtimems bigint,
>   unique bigint,
>   fields map<text, text>,
>   primary key ((occurday, seqnumber), occurtimems, unique)
> )
> {code}
> Pig Load statement Query
> {code}
> data = LOAD 'cql://ks/data?where_clause=seqnumber%3D10%20AND%20occurday%3D%272013-10-01%27'
USING CqlStorage();    
> {code}
> This results in an exception when processed by the the CqlPagingRecordReader which attempts
to page this query even though it contains at most one partition key. This leads to an invalid
CQL statement. 
> CqlPagingRecordReader Query
> {code}
> SELECT * FROM "data" WHERE token("occurday","seqnumber") > ? AND
> token("occurday","seqnumber") <= ? AND occurday='A Great Day' 
> AND seqnumber=1 LIMIT 1000 ALLOW FILTERING
> {code}
> Exception
> {code}
>  InvalidRequestException(why:occurday cannot be restricted by more than one relation
if it includes an Equal)
> {code}
> I'm not sure it is worth the special case but, a modification to not use the paging record
reader when the entire partition key is specified would solve this issue. 

This message was sent by Atlassian JIRA

View raw message