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

Reply via email to