Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E0D9FD7CA for ; Fri, 5 Oct 2012 22:30:35 +0000 (UTC) Received: (qmail 35998 invoked by uid 500); 5 Oct 2012 22:30:33 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 35966 invoked by uid 500); 5 Oct 2012 22:30:33 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 35952 invoked by uid 99); 5 Oct 2012 22:30:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 22:30:33 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of john.sanda@gmail.com designates 209.85.212.172 as permitted sender) Received: from [209.85.212.172] (HELO mail-wi0-f172.google.com) (209.85.212.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 22:30:25 +0000 Received: by mail-wi0-f172.google.com with SMTP id hq12so1052990wib.7 for ; Fri, 05 Oct 2012 15:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=SLFCceEwflJQnA3Ks0tO1y1+/bLPEf6OxJJ1mXmxBcM=; b=jjs+uXMUk0EnyQK6QnHCrE0aJ1v/cycgDa/iuYTH4rgpsHdHEF1YsLBJ4prFpDWZnR giJ4etiomQ1+yr8IpJDyTPDxfh8/TSKHbP/hS9gCxPysazrlMN1B3DHCqZLN21KYhM3G Mq+gvjLFy9Ra8LTU7VxoC6lqliFmgKFE8RRQQI7VOBD1NCYjy1mExstdNdvDqg3ry6aN 8y89hGKodP114ya0rmAHe8GNUFDG+61DTkDm9fEjSoNb/JvNQf2oTx4hx7TU1GZND/eU LFpEvsKvS7Ydxmn2BDaJU9mBoB+02WQVZp2WDh/ebRv9FGv8Nv91ANDoPFMutV5Q3Syz sw4w== MIME-Version: 1.0 Received: by 10.180.75.67 with SMTP id a3mr6081043wiw.1.1349476205438; Fri, 05 Oct 2012 15:30:05 -0700 (PDT) Received: by 10.216.205.72 with HTTP; Fri, 5 Oct 2012 15:30:05 -0700 (PDT) Date: Fri, 5 Oct 2012 18:30:05 -0400 Message-ID: Subject: question about where clause of CQL update statement From: John Sanda To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0438eba7dba82904cb576983 --f46d0438eba7dba82904cb576983 Content-Type: text/plain; charset=ISO-8859-1 I am using CQL 3 and trying to execute the following, UPDATE CHANGELOGLOCK SET LOCKED = 'true', LOCKEDBY = '10.11.8.242 (10.11.8.242)', LOCKGRANTED = '2012-10-05 16:58:01' WHERE ID = 1 AND LOCKED = 'false'; It gives me the error, Bad Request: PRIMARY KEY part locked found in SET part. The primary key consists only of the ID column, but I do have a secondary index on the locked column. Is it not possible to include a column in both the set clause and in the where clause? And if it is not possible, how come? Thanks - John --f46d0438eba7dba82904cb576983 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am using CQL 3 and trying to execute the following,

UP= DATE CHANGELOGLOCK SET LOCKED =3D 'true', LOCKEDBY =3D '10.11.8= .242 (10.11.8.242)', LOCKGRANTED =3D '2012-10-05 16:58:01' WHER= E ID =3D 1 AND LOCKED =3D 'false';


It gives me the error, Bad Request: PRIMARY K= EY part locked found in SET part. The primary key consists only of the ID c= olumn, but I do have a secondary index on the locked column. Is it not poss= ible to include a column in both the set clause and in the where clause? An= d if it is not possible, how come?

Thanks

- John
--f46d0438eba7dba82904cb576983--