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 C7ABB11F17 for ; Thu, 20 Feb 2014 18:07:24 +0000 (UTC) Received: (qmail 36926 invoked by uid 500); 20 Feb 2014 18:07:21 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 36876 invoked by uid 500); 20 Feb 2014 18:07:21 -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 36865 invoked by uid 99); 20 Feb 2014 18:07:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 18:07:21 +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 edlinuxguru@gmail.com designates 74.125.82.54 as permitted sender) Received: from [74.125.82.54] (HELO mail-wg0-f54.google.com) (74.125.82.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 18:07:14 +0000 Received: by mail-wg0-f54.google.com with SMTP id l18so1767823wgh.9 for ; Thu, 20 Feb 2014 10:06:54 -0800 (PST) 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=rxOEO4yh/SA6x0DalxebwXnQlr21Nd7NUc9lKya7BVM=; b=sw7fVG98IbSt3d/6ayvTL/Y1TBRABMvGTFR7syvhl6jm/kGfDGS+MvlKi2Yx+SxuDS 2t9cEwZD3UpXVTRxvLhQJrHPhu6GuONeHcMSWcvjddC74d/8HaRgp6zstd+lcaLMrkDo 2STfOSGnpqztFHWUvyaymqSIhh4+nVIONQM7Xx/BA00ALH4DR3nuPbrVQcZntlPS1bpn +LSt8tOCKPTLc9ahPZZVgna1z5Ui1l5bO4TtaOTE5SrnfM5tkQtGYirYT/WKaFnRutgO KVjFKJH6KprZ34/MSv2Iisf5gpcfgYwVxxk/A6nqZS2/NCcHMKWSnmBhBrEZHAAf8miU aHzw== MIME-Version: 1.0 X-Received: by 10.194.119.168 with SMTP id kv8mr3299709wjb.41.1392919614098; Thu, 20 Feb 2014 10:06:54 -0800 (PST) Received: by 10.194.220.105 with HTTP; Thu, 20 Feb 2014 10:06:54 -0800 (PST) In-Reply-To: References: Date: Thu, 20 Feb 2014 13:06:54 -0500 Message-ID: Subject: Re: paging state will not work From: Edward Capriolo To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=089e01176b1dcc952604f2da5ef0 X-Virus-Checked: Checked by ClamAV on apache.org --089e01176b1dcc952604f2da5ef0 Content-Type: text/plain; charset=ISO-8859-1 Cassandra has no null. So in this context setting a column to null or updating null is a delete. I think. I remember debating the semantics of null once. On Tuesday, February 18, 2014, Katsutoshi wrote: > Hi. > > I am using Cassandra 2.0.5 version. If null is explicitly set to a column, paging_state will not work. My test procedure is as follows: > > ------ > create a table and insert 10 records using cqlsh. the query is as follows: > > cqlsh:test> CREATE TABLE mytable (id int, range int, value text, PRIMARY KEY (id, range)); > cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 0); > cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 1); > cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 2); > cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 3); > cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 4); > cqlsh:test> INSERT INTO mytable (id, range, value) VALUES (0, 5, null); > cqlsh:test> INSERT INTO mytable (id, range, value) VALUES (0, 6, null); > cqlsh:test> INSERT INTO mytable (id, range, value) VALUES (0, 7, null); > cqlsh:test> INSERT INTO mytable (id, range, value) VALUES (0, 8, null); > cqlsh:test> INSERT INTO mytable (id, range, value) VALUES (0, 9, null); > > select data using datastax driver. the pseudocode is as follows: > > Statement statement = QueryBuilder.select().from("mytable").setFetchSize(1); > ResultSet rs = session.execute(statement); > for(Row row : rs){ > System.out.println(String.format("id=%s, range=%s, value=%s", > row.getInt("id"), row.getInt("range"), row.getString("value"))); > } > > the result is as follows: > > id=0, range=0, value=null > id=0, range=1, value=null > id=0, range=2, value=null > id=0, range=3, value=null > id=0, range=4, value=null > id=0, range=5, value=null > id=0, range=7, value=null > id=0, range=9, value=null > ------ > > Result is 8 records although 10 records were expected. Does anyone has a similar issue? > > Thanks, > Katsutoshi > -- Sorry this was sent from mobile. Will do less grammar and spell check than usual. --089e01176b1dcc952604f2da5ef0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cassandra has no null. So in this context setting a column to null or updat= ing null is a delete. I think. I remember debating the semantics of null on= ce.

On Tuesday, February 18, 2014, Katsutoshi <nagapad.0904@gmail.com> wrote:
> Hi.
>
> I am using Cassandra 2.0.5 version. If null is exp= licitly set to a column, paging_state will not work. My test procedure is a= s follows:
>
> ------
> create a table and insert 10 reco= rds using cqlsh. the query is as follows:
>
> =A0=A0=A0 cqlsh:test> CREATE TABLE mytable (id int, range i= nt, value text, PRIMARY KEY (id, range));
> =A0=A0=A0 cqlsh:test> = INSERT INTO mytable (id, range) VALUES (0, 0);
> =A0=A0=A0 cqlsh:test= > INSERT INTO mytable (id, range) VALUES (0, 1);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, range) VALUES (0, 2)= ;
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, range) VALUES (= 0, 3);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, range) VAL= UES (0, 4);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, range, value) VALUES= (0, 5, null);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, ra= nge, value) VALUES (0, 6, null);
> =A0=A0=A0 cqlsh:test> INSERT IN= TO mytable (id, range, value) VALUES (0, 7, null);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, range, value) VALUES= (0, 8, null);
> =A0=A0=A0 cqlsh:test> INSERT INTO mytable (id, ra= nge, value) VALUES (0, 9, null);
>
> select data using datastax= driver. the pseudocode is as follows:
>
> =A0=A0=A0 Statement statement =3D QueryBuilder.select().from(&= quot;mytable").setFetchSize(1);
> =A0=A0=A0 ResultSet rs =3D ses= sion.execute(statement);
> =A0=A0=A0 for(Row row : rs){
> =A0= =A0=A0=A0=A0=A0=A0 System.out.println(String.format("id=3D%s, range=3D= %s, value=3D%s",
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 row.getInt("id"), row.getI= nt("range"), row.getString("value")));
> =A0=A0= =A0 }
>
> the result is as follows:
>
> =A0=A0=A0 i= d=3D0, range=3D0, value=3Dnull
> =A0=A0=A0 id=3D0, range=3D1, value= =3Dnull
> =A0=A0=A0 id=3D0, range=3D2, value=3Dnull
> =A0=A0=A0 id=3D0, ra= nge=3D3, value=3Dnull
> =A0=A0=A0 id=3D0, range=3D4, value=3Dnull
= > =A0=A0=A0 id=3D0, range=3D5, value=3Dnull
> =A0=A0=A0 id=3D0, ra= nge=3D7, value=3Dnull
> =A0=A0=A0 id=3D0, range=3D9, value=3Dnull
> ------
>
> Result is 8 records although 10 records were ex= pected. Does anyone has a similar issue?
>
> Thanks,
> Ka= tsutoshi
>

--
Sorry this was sent from mobile. Will do les= s grammar and spell check than usual.
--089e01176b1dcc952604f2da5ef0--