You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (JIRA)" <ji...@apache.org> on 2015/05/15 01:00:00 UTC
[jira] [Assigned] (CASSANDRA-9395) Prohibit Counter type as part of
the PK
[ https://issues.apache.org/jira/browse/CASSANDRA-9395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brandon Williams reassigned CASSANDRA-9395:
-------------------------------------------
Assignee: Tyler Hobbs
> Prohibit Counter type as part of the PK
> ---------------------------------------
>
> Key: CASSANDRA-9395
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9395
> Project: Cassandra
> Issue Type: Bug
> Reporter: Sebastian Estevez
> Assignee: Tyler Hobbs
>
> C* let me do this:
> {code}
> create table aggregated.counter1 ( a counter , b int , PRIMARY KEY (b,a)) WITH CLUSTERING ORDER BY (a desc);
> {code}
> and then treated a as an int!
> {code}
> cqlsh> update aggregated.counter1 set a= a+1 where b = 2 ;Bad Request: Invalid operation (a = a + 1) for non counter column a
> {code}
> {code}
> insert INTO aggregated.counter1 (b, a ) VALUES ( 3, 2) ;
> {code}
> (should have given can't insert must update error)
> Even though desc table still shows it as a counter type:
> {code}
> CREATE TABLE counter1 (
> b int,
> a counter,
> PRIMARY KEY ((b), a)
> ) WITH CLUSTERING ORDER BY (a DESC) AND
> bloom_filter_fp_chance=0.010000 AND
> caching='KEYS_ONLY' AND
> comment='' AND
> dclocal_read_repair_chance=0.100000 AND
> gc_grace_seconds=864000 AND
> index_interval=128 AND
> read_repair_chance=0.000000 AND
> replicate_on_write='true' AND
> populate_io_cache_on_flush='false' AND
> default_time_to_live=0 AND
> speculative_retry='99.0PERCENTILE' AND
> memtable_flush_period_in_ms=0 AND
> compaction={'class': 'SizeTieredCompactionStrategy'} AND
> compression={'sstable_compression': 'LZ4Compressor'};
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)