incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: paging state will not work
Date Thu, 20 Feb 2014 14:06:52 GMT
I would try a fetch size other then 1. Cassandras slices are start
inclusive so maybe that is a bug.

On Tuesday, February 18, 2014, Katsutoshi <nagapad.0904@gmail.com> 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.

Mime
View raw message