cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-9816) ALTER TABLE ADD validation is overly strict for re-added collection columns
Date Thu, 16 Jul 2015 19:33:05 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-9816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14630217#comment-14630217
] 

Aleksey Yeschenko commented on CASSANDRA-9816:
----------------------------------------------

Pushed the fix and the test to a [GitHub branch|https://github.com/iamaleksey/cassandra/commits/9816]
(dependent on CASSANDRA-6717 commits pending review).

> ALTER TABLE ADD validation is overly strict for re-added collection columns
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9816
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9816
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Aleksey Yeschenko
>            Assignee: Aleksey Yeschenko
>            Priority: Minor
>             Fix For: 3.x
>
>
> {{AlterTableStatement}} ensures that we cannot re-add a collection column of a type that
is incompatible with a previously existing, dropped one.
> It doesn't make an exception, however, for {{frozen}} collections, yet those should be
allowed.
> Code in question:
> {code}
> if (dropped != null && (dropped.type == null || (dropped.type instanceof CollectionType
&& !type.isCompatibleWith(dropped.type))))
>     throw new InvalidRequestException(String.format("Cannot add a collection with the
name %s " +
>                 "because a collection with the same name and a different type%s has already
been used in the past",
>                 columnName, dropped.type == null ? "" : " (" + dropped.type.asCQL3Type()
+ ")"));
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message