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 282BCC8E4 for ; Fri, 8 Jun 2012 23:21:28 +0000 (UTC) Received: (qmail 75985 invoked by uid 500); 8 Jun 2012 23:21:25 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 75947 invoked by uid 500); 8 Jun 2012 23:21:25 -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 75939 invoked by uid 99); 8 Jun 2012 23:21:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 23:21:25 +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 (athena.apache.org: domain of edlinuxguru@gmail.com designates 209.85.161.172 as permitted sender) Received: from [209.85.161.172] (HELO mail-gg0-f172.google.com) (209.85.161.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jun 2012 23:21:20 +0000 Received: by ggnc4 with SMTP id c4so1963208ggn.31 for ; Fri, 08 Jun 2012 16:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=g8oZkZj8ZCzgUzOcO/vWBw9yqI9kU15cP8Ke+BCqKgU=; b=k3pvn1w1svOk0Mxq4MlWdd4adGp8Jnozgs6erWoABuePfGtMNSezTOmKP5YmL6JiyI W2flHhi7baOTcb3MuaJfC3BEc+1JQBH0DV7o/DHGxesZvLthB7F46aJ9G+xBhA1NDdij kCg9FB+g47ax05HlVrJbEBuuRHW4Mwr3P2g8yo1o78VMmGSlRhzZ1l4f9hlMQJ7WK1Et NJ70o+ouxragyHXX1Vj5Ek2zB/zqv2fBtrsbk0brWribyMWNdA7njKyCz8qrM9e6RChW JZO7QB7hn4zNqkZrWNjRo1JJcu/LaeIxLvAnhqQw1R7rSxjkeHyk7mXV3I55+3X2AxZk XqrQ== MIME-Version: 1.0 Received: by 10.50.236.97 with SMTP id ut1mr3403652igc.50.1339197659648; Fri, 08 Jun 2012 16:20:59 -0700 (PDT) Received: by 10.64.25.162 with HTTP; Fri, 8 Jun 2012 16:20:59 -0700 (PDT) In-Reply-To: References: <94EF7547-A375-40BE-B155-2E840D3E4B99@thelastpickle.com> Date: Fri, 8 Jun 2012 19:20:59 -0400 Message-ID: Subject: Re: Setting column to null From: Edward Capriolo To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=14dae9340b8dc992f504c1fe4069 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9340b8dc992f504c1fe4069 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Your best bet is to define the column as a composite column where one part represents is null and the other part is the data. On Friday, June 8, 2012, shashwat shriparv wrote: > What you can do is you can define some specific variable like "NULLDATA" some thing like that to update in columns that does have value > > > On Fri, Jun 8, 2012 at 11:58 PM, aaron morton wrote: > > You don't nee to set columns to null, delete the column instead. > Cheers > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > On 8/06/2012, at 9:34 AM, Leonid Ilyevsky wrote: > > Is it possible to explicitly set a column value to null? > > I see that if insert statement does not include a specific column, that column comes up as null (assuming we are creating a record with new unique key). > But if we want to update a record, how we set it to null? > > Another situation is when I use prepared cql3 statement (in Java) and send parameters when I execute it. If I want to leave some column unassigned, I need a special statement without that column. > What I would like is, prepare one statement including all columns, and then be able to set some of them to null. I tried to set corresponding ByteBuffer parameter to null, obviously got an exception. > ________________________________ > This email, along with any attachments, is confidential and may be legally privileged or otherwise protected from disclosure. Any unauthorized dissemination, copying or use of the contents of this email is strictly prohibited and may be in violation of law. If you are not the intended recipient, any disclosure, copying, forwarding or distribution of this email is strictly prohibited and this email and any attachments should be deleted immediately. This email and any attachments do not constitute an offer to sell or a solicitation of an offer to purchase any interest in any investment vehicle sponsored by Moon Capital Management LP (=E2=80=9CMoon Capital=E2=80=9D). Moon Capital does not provide legal, accounting or tax a= dvice. Any statement regarding legal, accounting or tax matters was not intended or written to be relied upon by any person as advice. Moon Capital does not waive confidentiality or privilege as a result of this email. > > > > -- > > > =E2=88=9E > > Shashwat Shriparv > > --14dae9340b8dc992f504c1fe4069 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Your best bet is to define the column as a composite column where one part = represents is null and the other part is the data.

On Friday, June 8= , 2012, shashwat shriparv <= dwivedishashwat@gmail.com> wrote:
> What you can do is you can define some specific variable like "NU= LLDATA" some thing like that to update in columns that does have value=
>
>
> On Fri, Jun 8, 2012 at 11:58 PM, aaron morton <= aaron@thelastpickle.com> = wrote:
>
> You don't nee to set columns to null, delete the column in= stead.
> Cheers
> -----------------
> Aaron Morton
>= ; Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
> On 8/06/2012, at 9:34 AM, Leonid Ilyevsky wrote:
>
> Is it= possible to explicitly set a column value to null?
> =C2=A0
> = I see that if insert statement does not include a specific column, that col= umn comes up as null (assuming we are creating a record with new unique key= ).
> But if we want to update a record, how we set it to null?
> =C2= =A0
> Another situation is when I use prepared cql3 statement (in Jav= a) and send parameters when I execute it. If I want to leave some column un= assigned, I need a special statement without that column.
> What I would like is, prepare one statement including all columns, and= then be able to set some of them to null. I tried to set corresponding Byt= eBuffer parameter to null, obviously got an exception.
> ____________= ____________________
> This email, along with any attachments, is confidential and may be leg= ally privileged or otherwise protected from disclosure. Any unauthorized di= ssemination, copying or use of the contents of this email is strictly prohi= bited and may be in violation of law. If you are not the intended recipient= , any disclosure, copying, forwarding or distribution of this email is stri= ctly prohibited and this email and any attachments should be deleted immedi= ately. This email and any attachments do not constitute an offer to sell or= a solicitation of an offer to purchase any interest in any investment vehi= cle sponsored by Moon Capital Management LP (=E2=80=9CMoon Capital=E2=80=9D= ). Moon Capital does not provide legal, accounting or tax advice. Any state= ment regarding legal, accounting or tax matters was not intended or written= to be relied upon by any person as advice. Moon Capital does not waive con= fidentiality or privilege as a result of this email.
>
>
>
> --
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
>
> =E2=88=9E
>
>= Shashwat Shriparv
>
> --14dae9340b8dc992f504c1fe4069--