[
https://issues.apache.org/jira/browse/CASSANDRA-21761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-21761:
-----------------------------------------
Bug Category: Parent values: Degradation(12984)
Complexity: Normal
Component/s: Legacy/Local Write-Read Paths
Discovered By: User Report
Fix Version/s: 5.0.x
6.x
7.x
Severity: Normal
Status: Open (was: Triage Needed)
> Re-adding a dropped column with the same frozen user type is rejected as
> incompatible
> -------------------------------------------------------------------------------------
>
> Key: CASSANDRA-21761
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21761
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Legacy/Local Write-Read Paths
> Reporter: Nadav Har'El
> Priority: Normal
> Fix For: 5.0.x, 6.x, 7.x
>
>
> After dropping a column of a frozen user type, re-adding a column with the
> same name and the *same* type fails:
> {code:sql}
> CREATE TYPE ks.udt (a int, b text);
> CREATE TABLE ks.t (p int PRIMARY KEY, x frozen<udt>);
> ALTER TABLE ks.t DROP x;
> ALTER TABLE ks.t ADD x frozen<udt>;
> {code}
> The last statement fails with:
> {noformat}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot
> add a column 'x' of type frozen<udt>, incompatible with previously dropped
> column 'x' of type frozen<tuple<int, text>>"
> {noformat}
> Reproduced on Cassandra 5.0.9 and 6.0-alpha2.
> The cause: a dropped column's type is recorded with its user types expanded
> into tuples ({{TableMetadata}}, {{column.type.expandUserTypes()}}), but
> {{AlterTableStatement}} compares the new, unexpanded type with it using
> {{isSerializationCompatibleWith()}}, and a {{UserType}} is not
> value-compatible with a {{TupleType}}. Expanding the new type the same way
> before the comparison would fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]