cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5017) Preparing UPDATE queries with collections returns suboptimal metadata
Date Wed, 05 Dec 2012 00:08:58 GMT

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

Aleksey Yeschenko commented on CASSANDRA-5017:
----------------------------------------------

CASSANDRA-5018 in indeed no longer an issue. Also I do get the right columns in my metadata
now:

{ok, R} = seestar_client:prepare(Pid, "update test.collections set amap[?] = ? WHERE id =
?").
{ok,{prepared,<<21,71,235,65,143,167,200,103,53,75,239,64,
                92,235,243,145>>,
              [{column,<<"test">>,<<"collections">>,<<"key(amap)">>,int},
               {column,<<"test">>,<<"collections">>,<<"value(amap)">>,
                       varchar},
               {column,<<"test">>,<<"collections">>,<<"id">>,int}]}}

However, when I try to execute the query (or just run it in cqlsh), I get "Bad Request: List
operations are only supported on List typed columns, but org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.Int32Type,org.apache.cassandra.db.marshal.UTF8Type)
given" error.
                
> Preparing UPDATE queries with collections returns suboptimal metadata
> ---------------------------------------------------------------------
>
>                 Key: CASSANDRA-5017
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5017
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.2.0 beta 2
>            Reporter: Aleksey Yeschenko
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.2.0 rc1
>
>         Attachments: 0001-Return-correct-metadata-when-preparing-map.txt, 0002-Fix-prepared-list-index-and-using-integer-for-map-keys.txt,
0003-Fix-handling-of-prepared-marker-for-deletes.txt
>
>
> CQL3, binary protocol.
> collections (id int primary key, amap map<int, varchar>);
> preparing "UPDATE test.collections SET amap[?] = ? WHERE id = ?" returns the following
metadata:
> [{column,<<"test">>,<<"collections">>,<<"amap">>,
>                        {map,int,varchar}},
>                {column,<<"test">>,<<"collections">>,<<"amap">>,
>                        {map,int,varchar}},
>                {column,<<"test">>,<<"collections">>,<<"id">>,int}]
> Ideally it should return [int, varchar, int] types. Less ideally [{map, int, varchar},
int] and expect an encoded map with a single key-value pair. But certainly not what it currently
returns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message