[ https://issues.apache.org/jira/browse/CASSANDRA-11368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032405#comment-17032405 ]
Jelmer Kuperus edited comment on CASSANDRA-11368 at 2/7/20 2:35 PM: -------------------------------------------------------------------- I just observed something similar {code:java} BEGIN BATCH insert into test_1(id, vector, version) values ('3', [0.1, 0.2], 0) insert into test_1(id, vector, version) values ('3', [0.1, 0.2], 0) APPLY BATCH;{code} Will result in {code:java} id | vector | version ----+----------------------+--------- 3 | [0.1, 0.2, 0.1, 0.2] | 0{code} This is highly unexpected. Does this have the same root cause ? In my case I was able to work around it my making the list frozen (which it should have been to begin with) was (Author: jelmer): I just observed something similar {code:java} BEGIN BATCH insert into test_1(id, vector, version) values ('3', [0.1, 0.2], 0) insert into test_1(id, vector, version) values ('3', [0.1, 0.2], 0) APPLY BATCH;{code} Will result in {code:java} id | vector | version ----+----------------------+--------- 3 | [0.1, 0.2, 0.1, 0.2] | 0{code} This is highly unexpected. Does this have the same root cause ? > Lists inserts are not truly idempotent > -------------------------------------- > > Key: CASSANDRA-11368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11368 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Core > Reporter: Thanh > Priority: Normal > > List of UDT can't be updated properly when using USING TIMESTAMP > Observe: > {code} > cqlsh:t360> CREATE TYPE fullname ( > ... fname text, > ... lname text > ... ); > cqlsh:t360> CREATE TABLE users ( > ... id text PRIMARY KEY, > ... names list<frozen <fullname>>, > ... phone text > ... ); > cqlsh:t360> UPDATE users USING TIMESTAMP 1458019725701 SET names = [{ fname: > 'fname1', lname: 'lname1'},{ fname: 'fname2', lname: 'lname2'},{ fname: > 'fname3', lname: 'lname3'}] WHERE id='a'; > cqlsh:t360> select * from users; > id | names | phone > ----+--------------------------------------------------------------------------------------------------------------+------- > > a | [{lname: 'lname1', fname: 'fname1'}, {lname: 'lname2', fname: 'fname2'}, > {lname: 'lname3', fname: 'fname3'}] | null > (1 rows) > cqlsh:t360> UPDATE users USING TIMESTAMP 1458019725701 SET names = [{ fname: > 'fname1', lname: 'lname1'},{ fname: 'fname2', lname: 'lname2'},{ fname: > 'fname3', lname: 'lname3'}] WHERE id='a'; > cqlsh:t360> select * from users; > id | names | phone > ----+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------- > > a | [{lname: 'lname1', fname: 'fname1'}, {lname: 'lname2', fname: 'fname2'}, > {lname: 'lname3', fname: 'fname3'}, {lname: 'lname1', fname: 'fname1'}, > {lname: 'lname2', fname: 'fname2'}, {lname: 'lname3', fname: 'fname3'}] | null > (1 rows) > {code} > => the list doesn't get replaced, it gets appended, which is not the > expected/desired result -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org