Details
-
Bug
-
Status: Triage Needed
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
All
-
None
Description
With the release of Cassandra 3.11.5 and the fixing of CASSANDRA-14948, it now appears that you can no longer re-add a SMALLINT column as an INT type. This is rather surprising as any SMALLINT value should be representable by an INT type.
The following example was run on Cassandra 3.11.5 on CentOS 7 installed from official RedHat repo:
cqlsh> CREATE KEYSPACE demo WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1}; cqlsh> CREATE TABLE demo.demo_table ( ... user_id BIGINT, ... created TIMESTAMP, ... points SMALLINT, ... PRIMARY KEY (user_id, created) ... ) WITH CLUSTERING ORDER BY (created DESC); cqlsh> ALTER TABLE demo.demo_table DROP points; cqlsh> ALTER TABLE demo.demo_table ADD points INT; InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot re-add previously dropped column 'points' of type int, incompatible with previous type smallint"