cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10721) Altering a UDT might break UDA deserialisation
Date Wed, 02 Dec 2015 14:16:11 GMT

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

Benjamin Lerer commented on CASSANDRA-10721:
--------------------------------------------

It seems that the branch contains a left over from some additional work (the second commit).

For the first commit:
* I think that we should probably refactor the {{userTypeUsedBy}} method. All those {{instanceof}}
are a clear sign that we should be using polymorphism (e.g. adding a {{useUserType(keyspaceName,
typeName)}} to {{AbstractType}}).
* {{checkTypeNotUsedByAggregate}} could be simplified by using {{ksm.functions.udas.anyMatch(<the
predicate>)}}.
* In the unit test, I think that the name {{alterDropSequence}} is a bit confusing. It should
probably be changed to something that express better the fact that the method is checking
that we cannot alter or drop the user type.


  

> Altering a UDT might break UDA deserialisation
> ----------------------------------------------
>
>                 Key: CASSANDRA-10721
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10721
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL, Distributed Metadata
>            Reporter: Aleksey Yeschenko
>            Assignee: Robert Stupp
>             Fix For: 3.0.x
>
>
> CASSANDRA-10650 switched UDA's {{initcond}} serialisation in schema to its CQL literal.
This means that if any particular field is renamed in the UDT, or of its type gets changes,
we will not be able to parse initcond back.
> We should either:
> 1) Forbid renames and type switches in UDTs that are being used in UDAs, or
> 2) Make sure we alter the UDAs in schema alongside the new UDT at all times



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

Mime
View raw message