[jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering
[ https://issues.apache.org/jira/browse/CASSANDRA-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13277943#comment-13277943 ] Jonathan Ellis commented on CASSANDRA-4246: --- Is this right? {code} if (stmt.keyRestriction == null || !(stmt.keyRestriction.isEquality() stmt.keyRestriction.eqValues.size() == 1)) {code} I would have expected {code} if (stmt.keyRestriction == null || !stmt.keyRestriction.isEquality() || stmt.keyRestriction.eqValues.size() != 1) {code} cql3 ORDER BY not ordering -- Key: CASSANDRA-4246 URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: paul cannon Assignee: Sylvain Lebresne Labels: cql3 Fix For: 1.1.1 Attachments: 4246.txt Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. Here's a cql script: {noformat} create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1; use test; create table moo (a int, b int, c int, primary key (a, b)); insert into moo (a, b, c) values (123, 12, 3400); insert into moo (a, b, c) values (122, 13, 3500); insert into moo (a, b, c) values (124, 10, 3600); insert into moo (a, b, c) values (121, 11, 3700); select * from moo; select * from moo order by b; {noformat} Here is the output of those two queries: {noformat} a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 {noformat} I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering
[ https://issues.apache.org/jira/browse/CASSANDRA-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13277954#comment-13277954 ] Sylvain Lebresne commented on CASSANDRA-4246: - Given that !(AB) == (!A)||(!B), I'd suggest that both are fine :) But I'm fine going with the second one if you find it more readable. cql3 ORDER BY not ordering -- Key: CASSANDRA-4246 URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: paul cannon Assignee: Sylvain Lebresne Labels: cql3 Fix For: 1.1.1 Attachments: 4246.txt Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. Here's a cql script: {noformat} create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1; use test; create table moo (a int, b int, c int, primary key (a, b)); insert into moo (a, b, c) values (123, 12, 3400); insert into moo (a, b, c) values (122, 13, 3500); insert into moo (a, b, c) values (124, 10, 3600); insert into moo (a, b, c) values (121, 11, 3700); select * from moo; select * from moo order by b; {noformat} Here is the output of those two queries: {noformat} a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 {noformat} I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering
[ https://issues.apache.org/jira/browse/CASSANDRA-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13277976#comment-13277976 ] Jonathan Ellis commented on CASSANDRA-4246: --- doh, demorgan fail :) i do think it's a little clearer to have a chain of || than a mix of || and , though cql3 ORDER BY not ordering -- Key: CASSANDRA-4246 URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: paul cannon Assignee: Sylvain Lebresne Labels: cql3 Fix For: 1.1.1 Attachments: 4246.txt Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. Here's a cql script: {noformat} create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1; use test; create table moo (a int, b int, c int, primary key (a, b)); insert into moo (a, b, c) values (123, 12, 3400); insert into moo (a, b, c) values (122, 13, 3500); insert into moo (a, b, c) values (124, 10, 3600); insert into moo (a, b, c) values (121, 11, 3700); select * from moo; select * from moo order by b; {noformat} Here is the output of those two queries: {noformat} a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 {noformat} I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering
[ https://issues.apache.org/jira/browse/CASSANDRA-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13278001#comment-13278001 ] Jonathan Ellis commented on CASSANDRA-4246: --- +1 cql3 ORDER BY not ordering -- Key: CASSANDRA-4246 URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: paul cannon Assignee: Sylvain Lebresne Labels: cql3 Fix For: 1.1.1 Attachments: 4246-2.txt, 4246.txt Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. Here's a cql script: {noformat} create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1; use test; create table moo (a int, b int, c int, primary key (a, b)); insert into moo (a, b, c) values (123, 12, 3400); insert into moo (a, b, c) values (122, 13, 3500); insert into moo (a, b, c) values (124, 10, 3600); insert into moo (a, b, c) values (121, 11, 3700); select * from moo; select * from moo order by b; {noformat} Here is the output of those two queries: {noformat} a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 {noformat} I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering
[ https://issues.apache.org/jira/browse/CASSANDRA-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13276140#comment-13276140 ] Sylvain Lebresne commented on CASSANDRA-4246: - Hum, I though we were correctly validating this but apparently not. In any case, the fix will be to disallow the second query. We don't know how to do ordering across multiple C* rows (and probably won't before quite some time). So, we should only allow order by when we know the query only select one physical C* row, which I though we were already doing but I'll fix. cql3 ORDER BY not ordering -- Key: CASSANDRA-4246 URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.1.0 Reporter: paul cannon Assignee: Sylvain Lebresne Labels: cql3 Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. Here's a cql script: {noformat} create keyspace test with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor = 1; use test; create table moo (a int, b int, c int, primary key (a, b)); insert into moo (a, b, c) values (123, 12, 3400); insert into moo (a, b, c) values (122, 13, 3500); insert into moo (a, b, c) values (124, 10, 3600); insert into moo (a, b, c) values (121, 11, 3700); select * from moo; select * from moo order by b; {noformat} Here is the output of those two queries: {noformat} a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 a | b | c -++-- 121 | 11 | 3700 122 | 13 | 3500 124 | 10 | 3600 123 | 12 | 3400 {noformat} I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira