Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread DuyHai Doan
Yes, you're right for update, only non primary key columns. For the idea of exposing row marker to public API, you can create a JIRA to make suggestion. On Wed, Jun 11, 2014 at 3:36 PM, Or Sher wrote: > That's what I mean, but you stated "you need either to use INSERT or > UPDATE by specifying

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread Or Sher
That's what I mean, but you stated "you need either to use INSERT or UPDATE by specifying all the columns in your statement". How can I use all columns in an update statement? Primary key parts can't be set.. "This is internal impl details, not supposed to be exposed as public API" Of course it's

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread DuyHai Doan
The only way to set a ttl on an entire existing CQL row is to Insert the row again with the same values. Is that correct? -> What do you mean by "entire existing CQL3 row" ? Do you mean setting TTL on every column of this row ? If so, the answer is yes, you need either to use INSERT or UPDATE by sp

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread Or Sher
Thanks DuyHai, Didn't had an idea it works like that is CQL. So per my understanding, the only way to set a ttl on an entire existing CQL row is to Insert the row again with the same values. Is that correct? Wouldn't it be simpler if Cassandra just let us change the ttl on the row marker? On Wed

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread DuyHai Doan
Yes, the TTL is also set on an internal row marker. More details on this here: https://issues.apache.org/jira/browse/CASSANDRA-6668 On Wed, Jun 11, 2014 at 10:38 AM, Or Sher wrote: > Hi, > > Does that mean internally there is a TTL for an entire CQL row?? > I thought ttl are only attached to CQ

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread Or Sher
Hi, Does that mean internally there is a TTL for an entire CQL row?? I thought ttl are only attached to CQL row values (Columns which are not in the PK). I thought when all values of a row are deleted, it should mean that that row does not exists. Please correct me where I'm wrong. On Wed, Jun

Re: Setting TTL to entire row: UPDATE vs INSERT

2014-06-11 Thread DuyHai Doan
Hello Or Sher, The behavior is quite normal: 1) insert into test_table (p1,p2,c1,d1,d2) values ('a','b','c','d','e'); --> Insert 5 columns without any TTL 2) update test_table using ttl 10 set d1='---', d2='---' where p1='a' and p2='b' and c1='c'; --> Re-insert columns d1 and d2 with new value

Setting TTL to entire row: UPDATE vs INSERT

2014-06-10 Thread Or Sher
Hi all, I encountered a strange phenomena (at least I believe it's strange) when trying to set a ttl for a whole row. When trying to set a ttl for a row using update statement and updating all values I'm getting kind of a "phantom cql row". When trying to do the same thing using an insert statemen