[
https://issues.apache.org/jira/browse/CASSANDRA-7648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Philip Thompson updated CASSANDRA-7648:
---------------------------------------
Since Version: (was: 1.2.18)
> ALTER TABLE does not take effect until nodes are restarted if table created
> via cli
> -----------------------------------------------------------------------------------
>
> Key: CASSANDRA-7648
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7648
> Project: Cassandra
> Issue Type: Bug
> Environment: Mac OSX
> Reporter: Philip Thompson
> Priority: Trivial
>
> A 3 node cluster is started on C* 1.2.18. The following commands are issued
> over cli:
> {code}
> CREATE KEYSPACE upgrade with placement_strategy =
> 'org.apache.cassandra.locator.SimpleStrategy'
> and strategy_options = {replication_factor:2};
> use upgrade;
> CREATE COLUMN FAMILY cf WITH comparator = UTF8Type
> AND key_validation_class=IntegerType
> AND column_metadata = [
> {column_name: v, validation_class: UTF8Type, index_type: KEYS}];
> {code}
> When the cluster is accessed via cqlsh, the CQL column names for table cf are
> 'key', and 'v'.
> According to http://www.datastax.com/dev/blog/thrift-to-cql3, it should be
> possible to run
> {code}
> ALTER TABLE cf RENAME key to k;
> {code}
> After performing the alter table, running 'DESC TABLE' shows that the column
> name has been successfully renamed to 'k' from 'key'. However, if
> {code}
> Select k from cf;
> {code}
> is run, then 'Bad Request: Undefined name k in selection clause' is
> returned. If the user runs 'select * from cf', the column name shows as 'key'
> not 'k'. The user is still able to issue queries against 'key', even though
> 'DESC TABLE' shows
> {code}
> CREATE TABLE cf (
> k varint PRIMARY KEY,
> v text
> ) WITH COMPACT STORAGE AND
> bloom_filter_fp_chance=0.010000 AND
> caching='KEYS_ONLY' AND
> comment='' AND
> dclocal_read_repair_chance=0.000000 AND
> gc_grace_seconds=864000 AND
> read_repair_chance=0.100000 AND
> replicate_on_write='true' AND
> populate_io_cache_on_flush='false' AND
> compaction={'class': 'SizeTieredCompactionStrategy'} AND
> compression={};
> {code}
> If the cluster is restarted, it fixes the problem.
--
This message was sent by Atlassian JIRA
(v6.2#6252)