Details
-
Bug
-
Status: Resolved
-
Urgent
-
Resolution: Duplicate
-
None
-
None
-
None
-
Critical
Description
Using 2.1 Beta through cqlsh:
CREATE TYPE subject_id ( ns text, id text ); create table test ( id int PRIMARY KEY, some_column map<subject_id, int>);
Both methods of inserting records appear to work and return with no error:
update test set some_column[{ns:'xyz.com', id:'userid'}] = 33 where id = 22222; insert into test (id, some_column) values (444, {{ns:'abc.com', id:'user2'}: 33});
retrieving the records fails
select * from test;
returns:
id | some_column -------+------------------------------------------------------------------------------ 444 | '\x00\x01\x00\x12\x00\x07abc.com\x00\x00\x05user2\x00\x00\x04\x00\x00\x00!' 22222 | '\x00\x01\x00\x13\x00\x07xyz.com\x00\x00\x06userid\x00\x00\x04\x00\x00\x00!' (2 rows) Failed to decode value '\x00\x01\x00\x12\x00\x07abc.com\x00\x00\x05user2\x00\x00\x04\x00\x00\x00!' (for column 'some_column') as map<subject_id, int>: unhashable type: 'list' Failed to decode value '\x00\x01\x00\x13\x00\x07xyz.com\x00\x00\x06userid\x00\x00\x04\x00\x00\x00!' (for column 'some_column') as map<subject_id, int>: unhashable type: 'list'
Attachments
Issue Links
- duplicates
-
CASSANDRA-6770 failure to decode multiple UDT
- Resolved