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 1B1FC9FB7 for ; Fri, 10 Feb 2012 21:32:09 +0000 (UTC) Received: (qmail 33012 invoked by uid 500); 10 Feb 2012 21:32:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 32958 invoked by uid 500); 10 Feb 2012 21:32:06 -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 32950 invoked by uid 99); 10 Feb 2012 21:32:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2012 21:32:05 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of JEREMIAH.JORDAN@morningstar.com designates 216.228.224.32 as permitted sender) Received: from [216.228.224.32] (HELO mx85.morningstar.com) (216.228.224.32) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 10 Feb 2012 21:31:58 +0000 Received: from [172.28.18.112] ([172.28.18.112]) by mx85.morningstar.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 10 Feb 2012 15:31:37 -0600 Message-ID: <4F358C8F.70505@morningstar.com> Date: Fri, 10 Feb 2012 15:30:55 -0600 From: Jeremiah Jordan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120202 Thunderbird/11.0 MIME-Version: 1.0 To: user@cassandra.apache.org CC: Drew Kutcharian Subject: Re: Deleting a column vs setting it's value to empty References: <2DCBA779-C020-4B32-8940-499CAE7B73DB@venarc.com> In-Reply-To: <2DCBA779-C020-4B32-8940-499CAE7B73DB@venarc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Feb 2012 21:31:37.0226 (UTC) FILETIME=[5E73BEA0:01CCE83B] X-Virus-Checked: Checked by ClamAV on apache.org Either one works fine. Setting to "" may cause you less headaches as you won't have to deal with tombstones. Deleting a non existent column is fine. -Jeremiah On 02/10/2012 02:15 PM, Drew Kutcharian wrote: > Hi Everyone, > > Let's say I have the following object which I would like to save in Cassandra: > > class User { > UUID id; //row key > String name; //columnKey: "name", columnValue: the name of the user > String description; //columnKey: "description", columnValue: the description of the user > } > > Description can be nullable. What's the best approach when a user updates her description and sets it to null? Should I delete the description column or set it to an empty string? > > In addition, if I go with the delete column strategy, since I don't know what was the previous value of description (the column could not even exist), what would happen when I delete a non existent column? > > Thanks, > > Drew >