Re: Update multiple rows in a CQL lightweight transaction

2014-02-27 Thread Sylvain Lebresne
On Thu, Feb 27, 2014 at 12:53 AM, Clint Kelly wrote: > Thanks for your help everyone. > > Sylvain, as I understand it, the scenario I described above is not > resolved by CASSANDRA-6561, correct? > Well, no, my point is that it kind of is resolved. At least if we're still talking about: "If th

Re: Update multiple rows in a CQL lightweight transaction

2014-02-26 Thread Clint Kelly
Thanks for your help everyone. Sylvain, as I understand it, the scenario I described above is not resolved by CASSANDRA-6561, correct? (This scenario may not matter to most folks, which is totally fine, I just want to make sure that I understand.) Should I instead look into using the Thrift API

Re: Update multiple rows in a CQL lightweight transaction

2014-02-25 Thread Sylvain Lebresne
Sorry to interfere again here but CASSANDRA-5633 will not be picked up because pretty much everything it was set to fix is fixed by CASSANDRA-6561, this is *not* a syntax problem anymore. On Wed, Feb 26, 2014 at 3:18 AM, Tupshin Harper wrote: > Unfortunately there is no option to vote for a "re

Re: Update multiple rows in a CQL lightweight transaction

2014-02-25 Thread Tupshin Harper
Unfortunately there is no option to vote for a "resolved" ticket, but if you can propose a better syntax that people agree on, you could probably get some fresh traction on it. -Tupshin On Feb 25, 2014 7:20 PM, "Clint Kelly" wrote: > Hi Tupshin, > > Thanks for your help! Unfortunately in my cas

Re: Update multiple rows in a CQL lightweight transaction

2014-02-25 Thread Clint Kelly
Hi Tupshin, Thanks for your help! Unfortunately in my case, I will need to do a compare and set in which the compare is against a value in a dynamic column. In general, I need to be able to do the following: - Check whether a given value exists in a dynamic column - If so, perform some nu

Re: Update multiple rows in a CQL lightweight transaction

2014-02-25 Thread Sylvain Lebresne
On Mon, Feb 24, 2014 at 11:32 PM, Tupshin Harper wrote: > Hi Clint, > > That does appear to be an omission in CQL3. It would be possible to > simulate it by doing > BEGIN BATCH > UPDATE foo SET z = 10 WHERE x = 'a' AND y = 1 IF t= 2 AND z=10; > UPDATE foo SET t = 5,z=6 where x = 'a' AND y

Re: Update multiple rows in a CQL lightweight transaction

2014-02-24 Thread Tupshin Harper
And, FWIW, I was just informed that the ticket that would have the actual functionality you are looking for exists, but is not scheduled for implementation due to lack of agreement about syntax to make it work: https://issues.apache.org/jira/browse/CASSANDRA-5633 -Tupshin On Mon, Feb 24, 2014 at

Re: Update multiple rows in a CQL lightweight transaction

2014-02-24 Thread Tupshin Harper
Hi Clint, That does appear to be an omission in CQL3. It would be possible to simulate it by doing BEGIN BATCH UPDATE foo SET z = 10 WHERE x = 'a' AND y = 1 IF t= 2 AND z=10; UPDATE foo SET t = 5,z=6 where x = 'a' AND y = 4 APPLY BATCH; However, this does a redundant write to the first ro

Re: Update multiple rows in a CQL lightweight transaction

2014-02-24 Thread Clint Kelly
Hi Tupshin, Thanks for your help; I appreciate it. Could I do something like the following? Given the same table you started with: x | y | t | z ---+---+---+ a | 1 | 2 | 10 a | 2 | 2 | 20 I'd like to write a compare-and-set that does something like: "If there is a row with (x,y,t,z) = (

Re: Update multiple rows in a CQL lightweight transaction

2014-02-22 Thread Tupshin Harper
#5633 was actually closed because the static columns feature ( https://issues.apache.org/jira/browse/CASSANDRA-6561) which has been checked in to the 2.0 branch but is not yet part of a release (it will be in 2.0.6). That feature will let you update multiple rows within a single partition by doin

Re: Update multiple rows in a CQL lightweight transaction

2014-02-21 Thread DuyHai Doan
Hello Clint The Resolution status of the JIRA is set to "Later", probably the implementation is not done yet. The JIRA was opened to discuss about impl strategy but nothing has been coded so far I guess. On Sat, Feb 22, 2014 at 12:02 AM, Clint Kelly wrote: > Folks, > > Does anyone know how I

Update multiple rows in a CQL lightweight transaction

2014-02-21 Thread Clint Kelly
Folks, Does anyone know how I can modify multiple rows at once in a lightweight transaction in CQL3? I saw the following ticket: https://issues.apache.org/jira/browse/CASSANDRA-5633 but it was not obvious to me from the comments how (or whether) this got resolved. I also couldn't find anyt