cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-3647) Support set and map value types in CQL
Date Wed, 18 Jul 2012 19:45:36 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Yaskevich updated CASSANDRA-3647:
---------------------------------------

    Attachment: CASSANDRA-3647-alternative.patch

Reopening this because it because committed code doesn't work and attaching my alternative
version with changes I was taking about in my previous comments.

When I try to do SET operation on any collection type I get following exception: 

{noformat}
java.lang.IllegalStateException: Composite column is already fully constructed
          at org.apache.cassandra.db.marshal.CompositeType$Builder.buildAsEndOfRange(CompositeType.java:290)
          at org.apache.cassandra.cql3.statements.UpdateStatement.addToMutation(UpdateStatement.java:250)
          at org.apache.cassandra.cql3.statements.UpdateStatement.mutationForKey(UpdateStatement.java:218)
          at org.apache.cassandra.cql3.statements.UpdateStatement.getMutations(UpdateStatement.java:171)
          at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:84)
          at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:108)
          at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:116)
          at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1240)
          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:184)
          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}

Following exceptions observed on List.Append:

{noformat}
java.lang.IllegalStateException: Composite column is already fully constructed
          at org.apache.cassandra.db.marshal.CompositeType$Builder.add(CompositeType.java:264)
          at org.apache.cassandra.db.marshal.CompositeType$Builder.add(CompositeType.java:196)
          at org.apache.cassandra.db.marshal.ListType.doAppend(ListType.java:197)
          at org.apache.cassandra.db.marshal.ListType.executeFunction(ListType.java:128)
          at org.apache.cassandra.db.marshal.CollectionType.execute(CollectionType.java:84)
          at org.apache.cassandra.cql3.statements.UpdateStatement.addToMutation(UpdateStatement.java:286)
          at org.apache.cassandra.cql3.statements.UpdateStatement.mutationForKey(UpdateStatement.java:218)
          at org.apache.cassandra.cql3.statements.UpdateStatement.getMutations(UpdateStatement.java:171)
          at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:84)
          at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:108)
          at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:116)
          at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1240)
          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:184)
          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}

And Set.Add

{noformat}
ava.lang.IllegalStateException: Composite column is already fully constructed
          at org.apache.cassandra.db.marshal.CompositeType$Builder.add(CompositeType.java:264)
          at org.apache.cassandra.db.marshal.CompositeType$Builder.add(CompositeType.java:196)
          at org.apache.cassandra.db.marshal.SetType.doAdd(SetType.java:111)
          at org.apache.cassandra.db.marshal.SetType.executeFunction(SetType.java:96)
          at org.apache.cassandra.db.marshal.CollectionType.execute(CollectionType.java:84)
          at org.apache.cassandra.cql3.statements.UpdateStatement.addToMutation(UpdateStatement.java:286)
          at org.apache.cassandra.cql3.statements.UpdateStatement.mutationForKey(UpdateStatement.java:218)
          at org.apache.cassandra.cql3.statements.UpdateStatement.getMutations(UpdateStatement.java:171)
          at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:84)
          at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:108)
          at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:116)
          at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1240)
          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:184)
          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}

Map.Put has the exact same problem but I won't add stacktrace here for brevity.

My patch, if accepted, could be taken as a ground to fix previously mentioned issues. 

Also I think I can do something about CollectionType.serializeForThrift if needed.
                
> Support set and map value types in CQL
> --------------------------------------
>
>                 Key: CASSANDRA-3647
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3647
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: cql
>             Fix For: 1.2
>
>         Attachments: CASSANDRA-3647-alternative.patch
>
>
> Composite columns introduce the ability to have arbitrarily nested data in a Cassandra
row.  We should expose this through CQL.

--
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

        

Mime
View raw message