You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2013/09/26 13:59:03 UTC
[jira] [Commented] (CASSANDRA-6095) INSERT query adds new value to
collection type
[ https://issues.apache.org/jira/browse/CASSANDRA-6095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13778690#comment-13778690 ]
Sylvain Lebresne commented on CASSANDRA-6095:
---------------------------------------------
You will need to provide a bit more info on how you reproduce (an example with cqlsh for instance) because on Cassandra 2.0.1:
{noformat}
[cqlsh 4.0.1 | Cassandra 2.0.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.37.0]
Use HELP for help.
cqlsh> CREATE KEYSPACE ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
cqlsh> USE ks;
cqlsh:ks> CREATE TABLE test (k int PRIMARY KEY, l list<int>);
cqlsh:ks> INSERT INTO test (k, l) VALUES (0, [0, 1]);
cqlsh:ks> INSERT INTO test (k, l) VALUES (0, [3, 4]);
cqlsh:ks> SELECT * FROM test;
k | l
---+--------
0 | [3, 4]
(1 rows)
{noformat}
So, the second insert does correctly replace the previous value, it does not append new values.
That being said, maybe you are running into CASSANDRA-6069. It doesn't seem to exactly fit the problem you are describing, but you haven't given us a lot of details so...
> INSERT query adds new value to collection type
> ----------------------------------------------
>
> Key: CASSANDRA-6095
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6095
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Ngoc Minh Vo
> Assignee: Sylvain Lebresne
>
> Hello,
> I don't know if somebody has reported this regression in v2.0.1: INSERT query adds new value to collection type (eg. List) instead of replacing it.
> CQL3 docs:
> http://cassandra.apache.org/doc/cql3/CQL.html#collections
> {quote}
> Note: An INSERT will always replace the entire list.
> {quote}
> We do not encounter this issue with v1.2.9.
> Could you please have a look at the issue?
> Thanks for your help.
> Best regards,
> Minh
--
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