[ https://issues.apache.org/jira/browse/CASSANDRA-5489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645845#comment-13645845 ]
Aleksey Yeschenko commented on CASSANDRA-5489: ---------------------------------------------- All right. I guess adding an all-or-nothing restriction at this point is okay-ish and makes more sense than the current one-alias-at-a-time restriction that's not even throwing a reasonable exception. But I don't exactly see how this avoids having to handle nulls, unless you are suggesting to serialize key/column aliases lists as '[]' in cases where there have been no renames and not '[null, null, null]' as it is now in trunk (for the 'test' table in your example). If that's the case, then I agree and support you. If it's not, then I'm against it - having nulls in column_aliases/key_aliases breaks DESCRIBE SCHEMA in cqlsh and every other implementation. Also, we still need to apply the cqlsh part of the v1 patch (and it can actually to to 1.2, with an added benefit that 1.2 cqlsh will be able to properly describe 2.0 schema). P.S. ALTER TABLE RENAME is broken for metadata-less (created via thrift/CLI) column families in trunk right now: {noformat} cqlsh:test> ALTER TABLE test RENAME column2 TO foo; Bad Request: Cannot rename unknown column column2 in table test cqlsh:test> ALTER TABLE test RENAME key TO foo; Bad Request: Cannot rename unknown column key in table test cqlsh:test> ALTER TABLE test RENAME value TO foo; Bad Request: Cannot rename unknown column value in table test {noformat} INSERT/SELECT still handle the auto-aliases as they should, but ALTER TABLE RENAME is broken. I'm surprised we don't have a dtest for this. > Fix 2.0 key and column aliases serialization and cqlsh DESC SCHEMA > ------------------------------------------------------------------ > > Key: CASSANDRA-5489 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5489 > Project: Cassandra > Issue Type: Bug > Components: Core, Tools > Affects Versions: 2.0 > Reporter: Aleksey Yeschenko > Assignee: Aleksey Yeschenko > Priority: Minor > Fix For: 2.0 > > Attachments: 5489-1.2.txt, 5489.txt > > > CASSANDRA-5125 made a slight change to how key_aliases and column_aliases are > serialized in schema. Prior to that we never kept nulls in the the json > pseudo-lists. This does break cqlsh and probably breaks 1.2 nodes receiving > such migrations as well. The patch reverts this behavior and also slightly > modifies cqlsh itself to ignore non-regular columns from > system.schema_columns table. > This patch breaks nothing, since 2.0 already handles 1.2 non-null padded > alias lists. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira