cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Branden Visser (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6330) LIMIT fetches one less than requested value
Date Mon, 11 Nov 2013 18:35:17 GMT

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

Branden Visser commented on CASSANDRA-6330:
-------------------------------------------

Should clarify, version is 1.2.11-SNAPSHOT as of this weekend.

> LIMIT fetches one less than requested value
> -------------------------------------------
>
>                 Key: CASSANDRA-6330
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6330
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Branden Visser
>            Assignee: Sylvain Lebresne
>
> Using Cassandra 1.2.11, the following sequence demonstrates the issue:
> {code:sql}
> CREATE TABLE blah (key text, column text, value text, PRIMARY KEY (key, column)) WITH
COMPACT STORAGE;
> INSERT INTO blah (key, column, value) VALUES ('a', 'a', 'a');
> INSERT INTO blah (key, column, value) VALUES ('a', 'b', 'e');
> INSERT INTO blah (key, column, value) VALUES ('a', 'c', 'e');
> INSERT INTO blah (key, column, value) VALUES ('a', 'd', 'e');
> INSERT INTO blah (key, column, value) VALUES ('a', 'e', 'e');
> SELECT column FROM blah WHERE key = 'a' AND column < 'c' ORDER BY column DESC LIMIT
2;
>  column
> --------
>       b
> {code}
> However I would expect columns b and a to both be returned. Only seems to be an issue
if the range bound is an exact match, and only if ORDER BY column DESC is used.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message