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

Sylvain Lebresne commented on CASSANDRA-4041:
---------------------------------------------

* In
{noformat}
List<AbstractType<?>> newTypes = new 
ArrayList<AbstractType<?>>(((CompositeType) cfm.comparator).types)
{{
    add(name.position, CFPropDefs.parseType(validator));
}};
{noformat}
it's set() that should be used, not add(). Nit: I'm not a fan of using the 
collection literal syntax in that case, especially when not using it takes half 
the number of lines.
* CFMetadata.apply() already check whether the new comparator is compatible 
with the old one. So we should probably rely on that rather than duplicating 
the check.
* Nit: CFMetadata.comparator is not final so we don't really need the new clone 
with comparator method.

I've pushed a test for this in the dtests (test that doesn't pass with this 
patch because of the add instead of set). It would really be awesome though if 
everyone took the habit of adding one with every patch for a CQL fix/new 
feature. 
                
> Allow updating column_alias types
> ---------------------------------
>
>                 Key: CASSANDRA-4041
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4041
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>            Reporter: Sylvain Lebresne
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>             Fix For: 1.1.2
>
>         Attachments: CASSANDRA-4041.patch
>
>
> CASSANDRA-3657 has added the ability to change comparators (including parts 
> of a compositeType) when compatible. The code of CQL3 forbids it currently 
> however so we should lift that limitation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to