You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mikhail Stepura (JIRA)" <ji...@apache.org> on 2014/02/25 20:52:26 UTC
[jira] [Updated] (CASSANDRA-6770) failure to decode multiple UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-6770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mikhail Stepura updated CASSANDRA-6770:
---------------------------------------
Attachment: CASSANDRA-2.1-6770.diff
Patch to return a tuple (which can be hashed) instead of a list
{code}
cqlsh> select * FROM test.users ;
login | addresses | name | phone_numbers
---------+--------------------------------------------------------------------------------------------------------------------------------------------+----------------+-------------------------------------------------------------------------------------
jbellis | {{city: 'Austin', address: '902 East 5th St. #202', zip: '78702'}, {city: 'Sunnyvale', address: '292 Gibraltar Drive #107', zip: '94089'}} | jonathan ellis | {{country: '+1', number: '512-537-7809'}, {country: '+44', number: '208 622 3021'}}
(1 rows)
cqlsh>
{code}
> failure to decode multiple UDT
> ------------------------------
>
> Key: CASSANDRA-6770
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6770
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Reporter: Jonathan Ellis
> Assignee: Mikhail Stepura
> Fix For: 2.1 beta2
>
> Attachments: CASSANDRA-2.1-6770.diff
>
>
> {code}
> CREATE TYPE address (
> city text,
> address text,
> zip text
> );
> CREATE TYPE phone_number (
> country text,
> number text
> );
> CREATE TABLE users (
> login text PRIMARY KEY,
> name text,
> addresses set<address>,
> phone_numbers set<phone_number>
> );
> insert into users (login, name, addresses, phone_numbers)
> values ('jbellis',
> 'jonathan ellis',
> {{city: 'Austin', address: '902 East 5th St. #202', zip: '78702'},
> {city: 'Sunnyvale', address: '292 Gibraltar Drive #107', zip: '94089'}},
> {{country: '+44', number: '208 622 3021'},
> {country: '+1', number: '512-537-7809'}});
> select * from users;
> {code}
> Result:
> {code}
> login | addresses | name | phone_numbers
> ---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+---------------------------------------------------------------------------------------------------------
> jbellis | '\x00\x02\x00)\x00\x06Austin\x00\x00\x15902 East 5th St. #202\x00\x00\x0578702\x00\x00/\x00\tSunnyvale\x00\x00\x18292 Gibraltar Drive #107\x00\x00\x0594089\x00' | jonathan ellis | '\x00\x02\x00\x14\x00\x02+1\x00\x00\x0c512-537-7809\x00\x00\x15\x00\x03+44\x00\x00\x0c208 622 3021\x00'
> (1 rows)
> Failed to decode value '\x00\x02\x00)\x00\x06Austin\x00\x00\x15902 East 5th St. #202\x00\x00\x0578702\x00\x00/\x00\tSunnyvale\x00\x00\x18292 Gibraltar Drive #107\x00\x00\x0594089\x00' (for column 'addresses') as set<address>: unhashable type: 'list'
> Failed to decode value '\x00\x02\x00\x14\x00\x02+1\x00\x00\x0c512-537-7809\x00\x00\x15\x00\x03+44\x00\x00\x0c208 622 3021\x00' (for column 'phone_numbers') as set<phone_number>: unhashable type: 'list'
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)