2
votes

I believe I have successfully implemented a Cassandra Java Integration solution, where I fetch back all of a table, in chunks, as specified by the fetch size, as described here https://docs.datastax.com/en/developer/java-driver/3.2/manual/paging/#setting-the-fetch-size

I also have the QueryLogger enabled, and I do see a CQL statement for each chunk, but it reads something like:

 select * from table;

each time. Whereas I would have expected some page / offset info to have been included, and the cql to look something (i.e. just for illustrative purposes, please dont take cql as syntactically correct!) like:

 select * from table limit 10, offset 20;

Is the CQL being truncated, our how is this all working? Thanks

1

1 Answers

2
votes

It's how the CQL is working - the query stays the same, but when the next page is retrieved, driver sends a paging state that was obtained with the previous page - it doesn't modify the query (btw, there is no such thing as offset in Cassandra).

Technical details are described in the native protocol specification, if you're interested.