[jira] [Created] (CASSANDRA-5472) Timeuuid with CLUSTERING ORDER DESC cannot be used with the dateOf CQL3 function
Gareth Collins created CASSANDRA-5472: - Summary: Timeuuid with CLUSTERING ORDER DESC cannot be used with the dateOf CQL3 function Key: CASSANDRA-5472 URL: https://issues.apache.org/jira/browse/CASSANDRA-5472 Project: Cassandra Issue Type: Bug Components: Core Affects Versions: 1.2.4 Reporter: Gareth Collins I originally raised this issue in the mailing lists: http://www.mail-archive.com/user@cassandra.apache.org/msg29185.html Here is what I tried: cqlsh:location> create table test_y (message_id timeuuid, name text, PRIMARY KEY (name,message_id)); cqlsh:location> insert into test_y (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_y (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_y (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_y (message_id,name) VALUES (now(),'foo'); cqlsh:location> select dateOf(message_id) from test_y; dateOf(message_id) -- 2013-04-13 00:33:42-0400 2013-04-13 00:33:43-0400 2013-04-13 00:33:43-0400 2013-04-13 00:33:44-0400 cqlsh:location> create table test_x (message_id timeuuid, name text, PRIMARY KEY (name,message_id)) WITH CLUSTERING ORDER BY (message_id DESC); cqlsh:location> insert into test_x (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_x (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_x (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_x (message_id,name) VALUES (now(),'foo'); cqlsh:location> insert into test_x (message_id,name) VALUES (now(),'foo'); cqlsh:location> select dateOf(message_id) from test_x; Bad Request: Type error: org.apache.cassandra.cql3.statements.Selection$SimpleSelector@1e7318 cannot be passed as argument 0 of function dateof of type timeuuid It should be possible to use dateOf on message_id in table test_x -- 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] [Created] (CASSANDRA-5386) CQL Not Handling Descending Clustering Order On A timeuuid Correctly
Gareth Collins created CASSANDRA-5386: - Summary: CQL Not Handling Descending Clustering Order On A timeuuid Correctly Key: CASSANDRA-5386 URL: https://issues.apache.org/jira/browse/CASSANDRA-5386 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.3 Environment: Apache Cassandra 1.2.3, Mac OS X (Lion), cql 3 Reporter: Gareth Collins I raised this issue as a question in the mailing list: http://www.mail-archive.com/user@cassandra.apache.org/msg28787.html If I create a table (cqlsh) with the following schema: CREATE TABLE mytable ( column1 text, column2 text, messageId timeuuid, message blob, PRIMARY KEY ((column1, column2), messageId)); I can quite happily add rows to this table: insert into client_queue (column1,column2,messageId,message) VALUES ('string1','string2',now(),'ABCCDCC123'); If I however create a table with a desc clustering order on messageid: CREATE TABLE mytable ( column1 text, column2 text, messageId timeuuid, message blob, PRIMARY KEY ((column1, column2), messageId)) WITH CLUSTERING ORDER BY (messageId DESC); Inserts are failing. I am getting the following error: insert into client_queue2 (column1,column2,messageId,message) VALUES ('string1','string2',now(),'ABCCDCC123'); I get the following error: Bad Request: Type error: cannot assign result of function now (type timeuuid) to messageid (type 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType)') -- 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