You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ryan Flynn <ry...@splunk.com> on 2017/03/22 22:57:18 UTC

Altering of types is not allowed

Hi,

I’m fairly new to this and am attempting a pretty basic “change column type” example.  I’m receiving an error saying InvalidRequest: Error from server: code=2200 [Invalid query] message="Altering of types is not allowed" upon attempting to change any column type.

For example, from the DataStax ALTER TABLE CQL Reference Page<https://docs.datastax.com/en/cql/3.1/cql/cql_reference/alter_table_r.html>, (assuming already USEing a particular keyspace)

                CREATE TABLE users (user_name varchar PRIMARY KEY, bio ascii);

Then,

                ALTER TABLE users ALTER bio TYPE text;

Results in the error mentioned above.  I saw this JIRA Issue<https://issues.apache.org/jira/browse/CASSANDRA-13141>, and it’s the only thing I can find related to this problem, although that use case is specific to changing time-related types.  Could someone tell me if I’m doing something wrong or if this is a known issue?  I originally saw this on version 3.10, then tried using 3.0.12, and the issue is present there as well.  And I’m just running these via cqlsh, if it makes any difference.

Thanks in advance!

Ryan Flynn

Re: Altering of types is not allowed

Posted by Vladimir Yudovin <vl...@winguzone.com>.
As error message said "Altering of types is not allowed" is not allowed in Cassandra. It's NO Sql, but still not schemaless  database.



Best regards, Vladimir Yudovin, 

Winguzone - Cloud Cassandra Hosting






---- On Wed, 22 Mar 2017 18:57:18 -0400 Ryan Flynn &lt;ryanf@splunk.com&gt; wrote ----




Hi,

 

I’m fairly new to this and am attempting a pretty basic “change column type” example.  I’m receiving an error saying InvalidRequest: Error from server: code=2200 [Invalid query] message="Altering of types is not allowed" upon attempting to change any column type.

 

For example, from the  DataStax ALTER TABLE CQL Reference Page, (assuming already USEing a particular keyspace)

 

                CREATE TABLE users (user_name varchar PRIMARY KEY, bio ascii);

 

Then,

 

                ALTER TABLE users ALTER bio TYPE text;

 

Results in the error mentioned above.  I saw this JIRA Issue, and it’s the only thing I can find related to this problem, although that use case is specific to changing time-related types.  Could someone tell me if I’m doing something wrong or if this is a known issue?  I originally saw this on version 3.10, then tried using 3.0.12, and the issue is present there as well.  And I’m just running these via cqlsh, if it makes any difference.

 

Thanks in advance!

 

Ryan Flynn