cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6722) cross-partition ordering should have warning or be disallowed when paging
Date Wed, 19 Feb 2014 15:36:19 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sylvain Lebresne updated CASSANDRA-6722:
----------------------------------------

    Attachment: 6722.txt

Attaching a patch that does 2 things:
# remove the ordering of results for compact tables when a IN is on the last clustering column
(see discussion above) so the only case where we do post-query reordering is with IN on partition
key + ORDER BY.
# throw IRE if the query needs post-query reordering and paging is on.


> cross-partition ordering should have warning or be disallowed when paging
> -------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6722
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6722
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Russ Hatch
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 2.0.6
>
>         Attachments: 6722.txt
>
>
> consider this schema/data/query:
> {noformat}
> CREATE TABLE paging_test (
>     id int,
>     value text,
>     PRIMARY KEY (id, value)
> ) WITH CLUSTERING ORDER BY (value ASC)
>             |id|value|
>             |1 |a    |
>             |2 |b    |
>             |1 |c    |
>             |2 |d    | 
>             |1 |e    | 
>             |2 |f    | 
>             |1 |g    | 
>             |2 |h    |
>             |1 |i    |
>             |2 |j    |
> select * from paging_test where id in (1,2) order by value asc;
> {noformat}
> When paging the above query I get the sorted results from id=1 first, then the sorted
results from id=2 after that. I was testing this because I was curious if the paging system
could somehow globally sort the results but it makes sense that we can't do that, since that
would require all results to be collated up front.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message