last in the Link header for pagination always points to the same page, whatever the result set.
Looks like count_query_results() in src/gquery.py returns a fixed 1000 (
), with a note that the real count query was too expensive, so it's skipped.
Not sure what the intended fix would be, given the count is left out on purpose. One idea that avoids a COUNT: ask for page_size + 1 rows, drop the extra, emit next only if it came back. That gives a correct next and end-of-results without the count. You'd still not get last, but it's not accurate today anyway.
last in the Link header for pagination always points to the same page, whatever the result set.
Looks like count_query_results() in src/gquery.py returns a fixed 1000 (
grlc/src/gquery.py
Line 99 in f41205b
Not sure what the intended fix would be, given the count is left out on purpose. One idea that avoids a COUNT: ask for page_size + 1 rows, drop the extra, emit next only if it came back. That gives a correct next and end-of-results without the count. You'd still not get last, but it's not accurate today anyway.