Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A10AEF749 for ; Wed, 1 May 2013 14:22:16 +0000 (UTC) Received: (qmail 50734 invoked by uid 500); 1 May 2013 14:22:16 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 50699 invoked by uid 500); 1 May 2013 14:22:16 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 50684 invoked by uid 99); 1 May 2013 14:22:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 14:22:16 +0000 Date: Wed, 1 May 2013 14:22:16 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-5531) Disallow renaming columns one at a time when when the table don't have CQL3 metadata yet MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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