Sorry, I thought I was running the latest version, but it was on this instance...
[cqlsh 4.1.0 | Cassandra 2.0.1-SNAPSHOT | CQL spec 3.1.1 | Thrift protocol 19.37.0] I tried with 2.0.4 and it works just fine. On Mon, Jan 13, 2014 at 9:07 PM, Huang, Roger <rohu...@visa.com> wrote: > Validimir, > > Thanks what version of Cassandra? > > -Roger > > > > > > *From:* Vladimir Prudnikov [mailto:v.prudni...@gmail.com] > *Sent:* Monday, January 13, 2014 11:57 AM > *To:* user > *Subject:* Problem inserting set when query contains IF NOT EXISTS. > > > > Hi all, > > I've spend a lot of time finding a bug in system, but it turns out that > the problem is in Cassandra. > > > > Here is how to reproduce. > > > > ============= > > CREATE KEYSPACE IF NOT EXISTS test_set WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor' : 1 }; > > USE test_set; > > > > CREATE TABLE IF NOT EXISTS user ( > > key timeuuid PRIMARY KEY, > > username text, > > email text, > > first_name text, > > last_name text, > > features set<text>, > > ) WITH caching='all'; > > > > INSERT INTO user(key,username,email,first_name,last_name,features) VALUES > (now(),'ainsttp0ess2kiphu2pe1bbrle',' > l3b7brn6jp9e8s0mmsr7ae5...@mmcm4jf9a9g9b95c053ksbsi18.com','gqh9ekmv6vc9nf1ce8eo3rjcdd','fmg92158br9ddivoj59417q514',{'i6v8i4a5gpnris5chjibllqf0','480m4c1obiq61ilii1g7rm0v17','50kovlifrtrtqihnvmbefaeacl'}) > IF NOT EXISTS; > > > > select * from user; > > ============== > > > > The problem here is that user.features is null instead of set of 3 strings. > > If you remove `IF NOT EXISTS` it executes correctly and set of string will > be inserted. > > > > I don't see any problem with the queries, seems to be the problem with C*. > > > > -- > Vladimir Prudnikov > -- Vladimir Prudnikov