0
votes

I have a number of existing Cassandra 2.0.0 CFs created by trift API and want to use Datastax DevCenter 1.1.1 and CQL3 in future, so I tried to change column types from blob-s to something more useful. In a particular CF all keys and values are just text (row key is a process name, cell names are some sort of timestamps in text format, values are strings captured at that time). I have successfully altered "key" type and "value" type to "text" but "column1" type makes me a problem.

When running the alter table command from DevCenter: alter table mycfname."MyTableName" alter column1 type text; I am getting popup with: Unable to execute CQL script on 'test': java.lan.AssertationError

Similar question has been asked on some other forum but never answered. Any thoughts? Regards Zoran

1
Can you include the full output of running desc table mycfname."MyTableName" as well as the full exception you are receiving after the alter table command?BrianC

1 Answers

1
votes

Altering the type of a column after inserting data can confuse CQL drivers/tools if the new type is incompatible with the data. The bytes stored in values for that column remain unchanged, and if existing data cannot be deserialized according to the new type, your CQL driver or interface might report errors.

These changes to a column type are not allowed:

Changing the type of a clustering column. Changing columns on which an index is defined.