You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "C. Scott Andreas (Jira)" <ji...@apache.org> on 2020/01/18 00:35:00 UTC

[jira] [Updated] (CASSANDRA-15504) INT is incompatible with previous type SMALLINT

     [ 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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org