[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449681#comment-13449681 ] Jonathan Ellis commented on CASSANDRA-4532: --- +1 NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Assignee: Sylvain Lebresne Priority: Minor Labels: Slice, cql, cql3 Fix For: 1.1.6 Attachments: 4532.txt I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0 bytes {noformat} Is there a way to achieve what I am doing here, it would be good if some meaning ful error is sent back, instead of cqlsh closing the transport. On the server side I see the following error. {noformat} ERROR [Thrift:3] 2012-08-12 15:15:24,414 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message. java.lang.NullPointerException at org.apache.cassandra.cql3.statements.SelectStatement$Restriction.setBound(SelectStatement.java:1277) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.updateRestriction(SelectStatement.java:1151) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1001) at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:215) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} With ThriftClient I get : {noformat} org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1402) at org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1388) {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449764#comment-13449764 ] basanth gowda commented on CASSANDRA-4532: -- Sylvian, Thanks for the fix, May be I should have opened the ticket differently. My main issue is not that the connection on cqlsh was getting closed (because of NPE) or exception being thrown in thrift client. To adopt CQL3 mainstream slice with paging is need, I saw some other ticket, where this proposal was there. Main reason I opened the ticket was for not being able to slice (rather no syntax support for that, to continue where the last query left off). This is a piece of code that was written using Hector and my assumption is the filtering was done on server side. We are using this in production. I modified attributes (to get rid of proprietary stuff, so may be broken, but should give an idea of what I was trying to do with CQL3) long cStartTime = 0L; long startTime = System.nanoTime(); boolean fetchNextBatch = true; int totalKeysFetched = 0; String lastKeyFetched = null; long cEndTime = Some Time in Millis; while(fetchNextBatch) { fetchNextBatch = false; int pageSize = 3; //Just for demonstration SliceQueryObject,DynamicComposite,String sliceQuery = HFactory.createSliceQuery(keyspace,cassCFConfig.getKeySerializer(),DynamicCompositeSerializer.get(),StringSerializer.get()); sliceQuery.setKey(C); sliceQuery.setColumnFamily(SOME CF NAME); DynamicComposite startRange = new DynamicComposite(); startRange.addComponent(cStartTime,LongSerializer.get()); //For the first fetch - this will be 0L startRange.addComponent(lastKeyFetched,StringSerializer.get()); // this will be null for first fetch DynamicComposite endRange = new DynamicComposite(); endRange.addComponent(new Long(cEndTime), LongSerializer.get(), LongType, AbstractComposite.ComponentEquality.LESS_THAN_EQUAL); //Add another config if we need columnPageSize sliceQuery.setRange(startRange,endRange,false,pageSize); long start = System.nanoTime(); QueryResultColumnSliceDynamicComposite, String result = sliceQuery.execute(); float t = (float)((System.nanoTime() - start)/100); System.out.println(TIME FOR QUERY : + t + MILLI SECONDS); ColumnSliceDynamicComposite, String cs = result.get(); ListHColumnDynamicComposite,String compositeList = cs.getColumns(); for(int i =0;icompositeList.size();i++) { HColumnDynamicComposite, String col = compositeList.get(i); cStartTime = col.getName().get(0,LongSerializer.get()); //This will be the cTime for the start range of the next query lastKeyFetched = col.getName().get(1,StringSerializer.get()); //In the start range for the next query, this key will be used. keyTimeMap.put(lastKeyFetched,scheduleStartTime); totalKeysFetched ++; } //Process Fetched Data fetchNextBatch = compositeList.size() == pageSize; // If the number of records retrieved is equal to the page size, then there are probably more records left } NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Assignee: Sylvain Lebresne Priority: Minor Labels: Slice, cql, cql3 Fix For: 1.1.6 Attachments: 4532.txt I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0
[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13449799#comment-13449799 ] Sylvain Lebresne commented on CASSANDRA-4532: - @basanth Slices are definitely supported in CQL3, the query I gave you earlier involves a slice for instance. In a fair amount of cases, paging within a Cassandra row is also pretty simple to do in CQL3 too. It is true that in some cases it's not completely as easy as in thrift. For those last cases, CASSANDRA-4415 should provide a solution. If you questions on how to translate some piece thrift code to CQL3, you're definitively welcome to ask them but please use the user mailing list for such inquiries. NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Assignee: Sylvain Lebresne Priority: Minor Labels: Slice, cql, cql3 Fix For: 1.1.6 Attachments: 4532.txt I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0 bytes {noformat} Is there a way to achieve what I am doing here, it would be good if some meaning ful error is sent back, instead of cqlsh closing the transport. On the server side I see the following error. {noformat} ERROR [Thrift:3] 2012-08-12 15:15:24,414 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message. java.lang.NullPointerException at org.apache.cassandra.cql3.statements.SelectStatement$Restriction.setBound(SelectStatement.java:1277) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.updateRestriction(SelectStatement.java:1151) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1001) at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:215) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} With ThriftClient I get : {noformat} org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1402) at
[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13444059#comment-13444059 ] basanth gowda commented on CASSANDRA-4532: -- I was trying to get a slice range, like you could do in thrift. table defn : create tables schedules(status ascii, timecreated bigint, key ascii, nil ascii, PRIMARY KEY(status,timecreated,key)); for the same time there can be a lot of entries. Lets suppose there are 50 entries that match where timecreated is Ln 1st query : select * from schedules where timecreated = Ln limit 10; 2nd Query : select * from schedules where timecreated=L10 AND key=K10 and timecreatedLn. In CQL terms this is a wrong query I know, basically not sure how to represent Between in CQL In Hector I would do, get slice range limiting 10 first time, for the next query (until no more are returned) I would use the time returned by last query and key returned by last query as the start range. This is in production and works perfectly fine NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Priority: Minor Labels: Slice, cql, cql3 I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0 bytes {noformat} Is there a way to achieve what I am doing here, it would be good if some meaning ful error is sent back, instead of cqlsh closing the transport. On the server side I see the following error. {noformat} ERROR [Thrift:3] 2012-08-12 15:15:24,414 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message. java.lang.NullPointerException at org.apache.cassandra.cql3.statements.SelectStatement$Restriction.setBound(SelectStatement.java:1277) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.updateRestriction(SelectStatement.java:1151) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1001) at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:215) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} With ThriftClient I get : {noformat} org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) at
[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13444067#comment-13444067 ] Jonathan Ellis commented on CASSANDRA-4532: --- can you test against trunk? NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Priority: Minor Labels: Slice, cql, cql3 I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0 bytes {noformat} Is there a way to achieve what I am doing here, it would be good if some meaning ful error is sent back, instead of cqlsh closing the transport. On the server side I see the following error. {noformat} ERROR [Thrift:3] 2012-08-12 15:15:24,414 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message. java.lang.NullPointerException at org.apache.cassandra.cql3.statements.SelectStatement$Restriction.setBound(SelectStatement.java:1277) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.updateRestriction(SelectStatement.java:1151) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1001) at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:215) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) {noformat} With ThriftClient I get : {noformat} org.apache.thrift.transport.TTransportException at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129) at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101) at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378) at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1402) at org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1388) {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CASSANDRA-4532) NPE when trying to select a slice from a composite table
[ https://issues.apache.org/jira/browse/CASSANDRA-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13444099#comment-13444099 ] basanth gowda commented on CASSANDRA-4532: -- No luck. See the last query closed the socket. Here are the steps to reproduce : cqlsh:testkeyspace1 create table compositetest(status ascii,ctime bigint,key ascii,nil ascii,PRIMARY KEY(status,ctime,key)); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345678,'key1',''); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345678,'key2',''); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345679,'key3',''); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345679,'key4',''); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345679,'key5',''); cqlsh:testkeyspace1 insert into compositetest(status,ctime,key,nil) VALUES ('C',12345680,'key6',''); cqlsh:testkeyspace1 select * from compositetest; status | ctime| key | nil +--+--+- C | 12345678 | key1 | C | 12345678 | key2 | C | 12345679 | key3 | C | 12345679 | key4 | C | 12345679 | key5 | C | 12345680 | key6 | 1st query of slice : cqlsh:testkeyspace1 select * from compositetest where ctime=12345680 limit 3; status | ctime| key | nil +--+--+-- C | 12345678 | key1 | C | 12345678 | key2 | C | 12345679 | key3 | null Second Query : I want to get values where first one left off (Yes you could do this with hector) [Try 1] cqlsh:testkeyspace1 select * from compositetest where ctime=12345679 and key='key3' and ctime=12345680 limit 3; Bad Request: PRIMARY KEY part key cannot be restricted (preceding part ctime is either not restricted or by a non-EQ relation) [Try 2] cqlsh:testkeyspace1 select * from compositetest where ctime=12345679 and key='key3' and ctime=12345680 limit 3; TSocket read 0 bytes cqlsh:testkeyspace1 NPE when trying to select a slice from a composite table Key: CASSANDRA-4532 URL: https://issues.apache.org/jira/browse/CASSANDRA-4532 Project: Cassandra Issue Type: Bug Components: API, Core Affects Versions: 1.1.3 Environment: Cassandra 1.1.3 (2 nodes) on a single host - mac osx Reporter: basanth gowda Priority: Minor Labels: Slice, cql, cql3 I posted this question on StackOverflow, because i need a solution. Created a table with : {noformat} create table compositetest(m_id ascii,i_id int,l_id ascii,body ascii, PRIMARY KEY(m_id,i_id,l_id)); {noformat} wanted to slice the results returned, so did something like below, not sure if its the right way. The first one returns data perfectly as expected, second one to get the next 3 columns closes the transport of my cqlsh {noformat} cqlsh:testkeyspace1 select * from compositetest where i_id=3 limit 3; m_id | i_id | l_id | body --+--+--+-- m1 |1 | l1 | b1 m1 |2 | l2 | b2 m2 |1 | l1 | b1 cqlsh:testkeyspace1 Was trying to write something for slice range. TSocket read 0 bytes {noformat} Is there a way to achieve what I am doing here, it would be good if some meaning ful error is sent back, instead of cqlsh closing the transport. On the server side I see the following error. {noformat} ERROR [Thrift:3] 2012-08-12 15:15:24,414 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message. java.lang.NullPointerException at org.apache.cassandra.cql3.statements.SelectStatement$Restriction.setBound(SelectStatement.java:1277) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.updateRestriction(SelectStatement.java:1151) at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1001) at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:215) at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:121) at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1237) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542) at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186) at