cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5531) Disallow renaming columns one at a time when when the table don't have CQL3 metadata yet
Date Wed, 01 May 2013 14:22:16 GMT
Sylvain Lebresne created CASSANDRA-5531:
-------------------------------------------

             Summary: Disallow renaming columns one at a time when when the table don't have
CQL3 metadata yet
                 Key: CASSANDRA-5531
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5531
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.0
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
            Priority: Minor
             Fix For: 1.2.5


As noted in CASSANDRA-5489, if you have a "thrift" CF, say:
{noformat}
[default@ks] create column family test with comparator='CompositeType(Int32Type, Int32Type,
Int32Type)' and key_validation_class=UTF8Type and default_validation_class=UTF8Type;
{noformat}

And that trying to use it in CQL3 you rename the columns one at a time, you can get:
{noformat}
cqlsh:ks> DESC COLUMNFAMILY test;

CREATE TABLE test (
  key text,
  column1 int,
  column2 int,
  column3 int,
  value text,
  PRIMARY KEY (key, column1, column2, column3)
) WITH COMPACT STORAGE ...
cqlsh:ks> ALTER TABLE test RENAME column2 TO foo;
TSocket read 0 bytes
{noformat}

No, it happens that renaming the columns one at a time is a bad idea anyway as it can confuse
the CQL3 code in some cases. So I suggest to disallow that and to force renaming all columns
in one request the first you use a thrift CF from CQL3.

To be clear, you will still be able to rename columns one at a time in general, it's just
for the first time you rename on a metadata-less CF. So overall that's a very small limitation
and it simplify our lives code-wise.

See CASSANDRA-5489 for a bit more context here.

--
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

Mime
View raw message