cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-10760) Counters are erroneously allowed as map key type
Date Mon, 23 Nov 2015 18:44:10 GMT
Aleksey Yeschenko created CASSANDRA-10760:

             Summary: Counters are erroneously allowed as map key type
                 Key: CASSANDRA-10760
             Project: Cassandra
          Issue Type: Bug
          Components: CQL
            Reporter: Aleksey Yeschenko
            Priority: Minor
             Fix For: 2.1.x, 2.2.x, 3.0.x

We do validate collection value types, but not collection key types, which allows counters
to be used as map keys:

cqlsh> create keyspace test with replication = {'class': 'SimpleStrategy', 'replication_factor':
cqlsh> use test;
cqlsh:test> create table test.test (id int primary key, amap map<counter, text>);
cqlsh:test> insert into test.test (id, amap) values (0, {1: '2'});
cqlsh:test> select * from test.test;

 id | amap
  0 | {1: '2'}

(1 rows)

This should obviously not be allowed and must be rejected.

/cc [~slebresne]

This message was sent by Atlassian JIRA

View raw message