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 2C27111863 for ; Tue, 22 Apr 2014 00:10:35 +0000 (UTC) Received: (qmail 39542 invoked by uid 500); 22 Apr 2014 00:10:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 39452 invoked by uid 500); 22 Apr 2014 00:10:31 -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 39444 invoked by uid 99); 22 Apr 2014 00:10:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 00:10:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andreas.josef.wagner@googlemail.com designates 74.125.83.45 as permitted sender) Received: from [74.125.83.45] (HELO mail-ee0-f45.google.com) (74.125.83.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Apr 2014 00:10:26 +0000 Received: by mail-ee0-f45.google.com with SMTP id d17so4028242eek.32 for ; Mon, 21 Apr 2014 17:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=5pcu06ir6EUqwlPXze0RBhjR/GYVp/aFaxhq8o/31rU=; b=QdnL85Yn+0pb7/cs25rX1QMP4yP0GHEz51jinsOyYe+MFBJ5xM2c3XsXJIVVqKOOxY rQiYfX6BtcvNOPlkVcATWJctybkOckFgIyB1teCcCZYXOk7VeS+G5MP2+MUNMVMMA3ir 9E9Tg1Cz5MUfk8kIuRXlTQHyCW4wEBayoFjgaECNbydQVjbiOXMAGRh5riWdOKeiCEEZ QkR3FJt8z8RYMD27Oy5tGpMXDgCLSL9m2ztJS7BHr60FLPB9pUZubFHaflKH5bwo8u1F 4/RxfzviRuEy6f3XXTyPMuKKDN7XcW/cUrUBqLOgie0y3HyIL3RvFBBPNXrErFbKJa6P RB5Q== X-Received: by 10.14.115.195 with SMTP id e43mr5954160eeh.76.1398125405292; Mon, 21 Apr 2014 17:10:05 -0700 (PDT) Received: from [192.168.178.28] (dslb-178-007-109-021.pools.arcor-ip.net. [178.7.109.21]) by mx.google.com with ESMTPSA id bc51sm107849751eeb.22.2014.04.21.17.10.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 17:10:04 -0700 (PDT) Message-ID: <5355B35B.7070507@googlemail.com> Date: Tue, 22 Apr 2014 02:10:03 +0200 From: Andreas Wagner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: Deleting column names References: <534E50A4.9030805@gmail.com> In-Reply-To: <534E50A4.9030805@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi cassandra users, hi Sebastian, I'd be interested in this ... is there any update/solution? Thanks so much ;) Andreas On 04/16/2014 11:43 AM, Sebastian Schmidt wrote: > Hi, > > I'm using a Cassandra table to store some data. I created the table like > this: > CREATE TABLE IF NOT EXISTS table_name (s BLOB, p BLOB, o BLOB, c BLOB, > PRIMARY KEY (s, p, o, c)); > > I need the at least the p column to be sorted, so that I can use it in a > WHERE clause. So as far as I understand, the s column is now the row > key, and (p, o, c) is the column name. > > I tried to delete single entries with a prepared statement like this: > DELETE p, o, c FROM table_name WHERE s = ? AND p = ? AND o = ? AND c = ?; > > That didn't work, because p is a primary key part. It failed during > preparation. > > I also tried to use variables like this: > DELETE ?, ?, ? FROM table_name WHERE s = ?; > > This also failed during preparation, because ? is an unknown identifier. > > > Since I have multiple different p, o, c combinations per s, deleting the > whole row identified by s is no option. So how can I delete a s, p, o, c > tuple, without deleting other s, p, o, c tuples with the same s? I know > that this worked with Thrift/Hector before. > > Regards, > Sebastian