[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648872#comment-14648872 ] zhaoyan commented on CASSANDRA-9606: hello~ what's the Fix Version? > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648884#comment-14648884 ] Sam Tunnicliffe commented on CASSANDRA-9606: Sorry, this is still waiting for review. I'll try and get to it in the next few days so it will probably make it into the next release on each target branch (2.0.17, 2.1.9, 2.2.1). > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14653664#comment-14653664 ] Sam Tunnicliffe commented on CASSANDRA-9606: Sorry this review has taken so long, it fell behind a couple of other tasks in my backlog and then this is a particularly esoteric corner of the code (though thankfully it does get clearer in later branches). I just have a few remarks: In all three patches, there are changes to how partition key restrictions are handled; explictly in the 2.0 & 2.1 patches in {{SelectStatement#updateRestrictionsForRelation}} and implicitly (I think) in 2.2, but there aren't any new or updated tests that cover a change in behaviour. Is it possible to add some? In the 2.0 and 2.1 patches, {{SelectStatement#updateSingleColumnRestriction}} had me scratching my head for a while, maybe a comment on the new check at line 1945/1953 might help clarify what's going on there. Nits (can be fixed on commit) In the 2.1 patch, there's an unused import in {{Restriction}} (it isn't new, but may as well remove it) In the 2.2 patch indentation error in {{MultiColumnRestriction.Slice}} where the private modifier has been removed The merge from 2.2 to trunk after applying the 2.2 patch generates a few conflicts, but they're reasonably straightforward to resolve so I don't think there's any need for a 3.0 specific patch. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659755#comment-14659755 ] Benjamin Lerer commented on CASSANDRA-9606: --- Thanks for the review. The new patch for 2.0 is [here|https://github.com/apache/cassandra/compare/trunk...blerer:9606] The new patch for 2.1 is [here|https://github.com/apache/cassandra/compare/trunk...blerer:9606-2.1] The new patch for 2.2 is [here|https://github.com/apache/cassandra/compare/trunk...blerer:9606-2.2] {quote}In all three patches, there are changes to how partition key restrictions are handled; explictly in the 2.0 & 2.1 patches in SelectStatement#updateRestrictionsForRelation and implicitly (I think) in 2.2, but there aren't any new or updated tests that cover a change in behaviour. Is it possible to add some? {quote} As slice restrictions and multi-column restrictions are not allowed on partition key columns, I added some tests to make sure that the errors thrown were the good ones. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14661498#comment-14661498 ] Sam Tunnicliffe commented on CASSANDRA-9606: +1 lgtm > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589723#comment-14589723 ] Benjamin Lerer commented on CASSANDRA-9606: --- The query should be invalid in 2.0. We do not allow multi-column restrictions and single-column restrictions on the same column. What we allow is: {{select * from test where a=1 and (b)<(6) and (b,c) > (3,2) limit 2;}}. Which will give you exactly what you want. Be aware that mixing multi and single column restrictions has only been properly fixed in 2.0.15 and 2.1.5 by CASSANDRA-8613. If what you want to do is paging, I advise you to check if the latest version of the driver that you use is not supporting manual paging like the java driver: http://datastax.github.io/java-driver/2.0.10/features/paging/#manual-paging > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14589727#comment-14589727 ] Sylvain Lebresne commented on CASSANDRA-9606: - {{(b)<(6)}} should be absolutely equivalent {{b<6}} or it's a bug. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592863#comment-14592863 ] zhaoyan commented on CASSANDRA-9606: thanks for your advice。 but the paging you advice is in one request. i want one request is one page. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592865#comment-14592865 ] zhaoyan commented on CASSANDRA-9606: It confuses me. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593172#comment-14593172 ] Benjamin Lerer commented on CASSANDRA-9606: --- We discussed it offline with Sylvain and it is clear that it is confusing. I will make them equivalent. > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9606) this query is not supported in new version
[ https://issues.apache.org/jira/browse/CASSANDRA-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1460#comment-1460 ] Benjamin Lerer commented on CASSANDRA-9606: --- @Tyler could you review? > this query is not supported in new version > -- > > Key: CASSANDRA-9606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9606 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: cassandra 2.1.6 > jdk 1.7.0_55 >Reporter: zhaoyan >Assignee: Benjamin Lerer > Attachments: 9606-2.0.txt, 9606-2.1.txt, 9606-2.2.txt > > > Background: > 1、create a table: > {code} > CREATE TABLE test ( > a int, > b int, > c int, > d int, > PRIMARY KEY (a, b, c) > ); > {code} > 2、query by a=1 and b<6 > {code} > select * from test where a=1 and b<6; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (6 rows) > {code} > 3、query by page > first page: > {code} > select * from test where a=1 and b<6 limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 1 | 2 > 1 | 3 | 2 | 2 > (2 rows) > {code} > second page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 3 | 4 | 2 > 1 | 3 | 5 | 2 > (2 rows) > {code} > last page: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,5) limit 2; > a | b | c | d > ---+---+---+--- > 1 | 4 | 4 | 2 > 1 | 5 | 5 | 2 > (2 rows) > {code} > question: > this query by page is ok when cassandra 2.0.8. > but is not supported in the latest version 2.1.6 > when execute: > {code} > select * from test where a=1 and b<6 and (b,c) > (3,2) limit 2; > {code} > get one error message: > InvalidRequest: code=2200 [Invalid query] message="Column "b" cannot have > both tuple-notation inequalities and single-column inequalities: (b, c) > (3, > 2)" -- This message was sent by Atlassian JIRA (v6.3.4#6332)