cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Stepura (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-7267) Embedded sets in user defined data-types are not updating
Date Thu, 22 May 2014 07:47:39 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14005698#comment-14005698
] 

Mikhail Stepura edited comment on CASSANDRA-7267 at 5/22/14 7:47 AM:
---------------------------------------------------------------------

Here is the thing. There are 2 sets in the result, one is embedded in an user type ({{members}})
and one is 'standalone' ({{tags}}). The problem is that the server sends the length of a 'standalone'
set as a 2byte short value and the length for the 'embedded' one as a 4byte integer.

The python-driver (1.1.2 in this case) always expects 2 bytes, so it fails to decode the embedded
set

/cc [~thobbs] [~slebresne] 


was (Author: mishail):
Here is the thing. There are 2 sets in the result, one is embedded in an user type ({{members}}
and one is 'standalone'({{tags}}). The problem is that the server send the length of a 'standalone'
set as a 2byte short value and the length for the 'embedded' as a 4byte integer.

The python-driver (1.1.2 in this case) always expects 2 bytes, so it fails to decode the set

/cc [~thobbs] [~slebresne] 

> Embedded sets in user defined data-types are not updating
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-7267
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7267
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Thomas Zimmer
>            Assignee: Mikhail Stepura
>              Labels: cqlsh
>             Fix For: 2.1 rc1
>
>
> Hi,
> i just played around with Cassandra 2.1.0 beta2 and i might have found an issue with
embedded Sets in User Defined Data Types.
> Here is how i can reproduce it:
> 1.) Create a keyspace "test"
> 2.) Create a table like this:
> {{create table songs (title varchar PRIMARY KEY, band varchar, tags Set<varchar>);}}
> 3.) Create a udt like this:
> {{create type band_info_type (founded timestamp, members Set<varchar>, description
text);}}
> 4.) Try to insert data:
> {code}
> insert into songs (title, band, band_info, tags) values ('The trooper', 'Iron Maiden',
{founded:188694000, members: {'Bruce Dickinson', 'Dave Murray', 'Adrian Smith', 'Janick Gers',
'Steve Harris', 'Nicko McBrain'}, description: 'Pure evil metal'}, {'metal', 'england'});
> {code}
> 5.) Select the data:
> {{select * from songs;}}
> Returns this:
> {code}
> The trooper | Iron Maiden | {founded: '1970-01-03 05:24:54+0100', members: {}, description:
'Pure evil metal'} | {'england', 'metal'}
> {code}
> The embedded data-set seems to empty. I also tried updating a row which also does not
seem to work.
> Regards,
> Thomas



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message