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

C. Scott Andreas updated CASSANDRA-15504:
-----------------------------------------
    Component/s: Cluster/Schema

> INT is incompatible with previous type SMALLINT
> -----------------------------------------------
>
>                 Key: CASSANDRA-15504
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15504
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Cluster/Schema
>            Reporter: Marcus Truscello
>            Priority: Normal
>
> 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:
>  
>  
> {noformat}
> 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"{noformat}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to