Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-4982

cqlsh: alter table add column with table that has collection fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.0 beta 3
    • None
    • None
    • Normal

    Description

      create keyspace collections with replication =

      {'class':'SimpleStrategy', 'replication_factor':1}

      ;
      use collections;
      create table collections (key int primary key, aset set<text>);
      insert into collections (key, aset) values (1,

      {'fee', 'fi'}

      );
      alter table collections add aaa text;

      ERROR 16:52:33,792 Error occurred during processing of message.
      java.lang.UnsupportedOperationException: ColumnToCollectionType should only be used in composite types, never alone
      at org.apache.cassandra.db.marshal.ColumnToCollectionType.validate(ColumnToCollectionType.java:103)
      at org.apache.cassandra.config.CFMetaData.validate(CFMetaData.java:1094)
      at org.apache.cassandra.service.MigrationManager.announceColumnFamilyUpdate(MigrationManager.java:202)
      at org.apache.cassandra.cql3.statements.AlterTableStatement.announceMigration(AlterTableStatement.java:217)
      at org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:73)
      at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:132)
      at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:140)
      at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1706)
      at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4074)
      at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4062)
      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:199)
      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:662)

      Attachments

        1. 4982.txt
          2 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            dbrosius David Brosius
            Sylvain Lebresne
            David Brosius
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: