Server-side pagination for large result sets

- ResultStore: execute query, store batches server-side, serve pages on demand
- POST /query/paged → returns query_id + total_rows + page count (no rows)
- GET /query/page/{id}/{page}?size=100 → returns one page of rows
- RecordBatch slicing for efficient page extraction from Arrow batches
- LRU eviction: keeps 50 most recent query results in memory
- Tested: 100K rows → 1,000 pages of 100, any page fetchable by number
- Supervisor pattern: chunk results, serve on demand, retry-safe (idempotent GET)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-03-27 20:54:44 -05:00
co-authored by Claude Opus 4.6
parent ed17216005
commit 238cb84d26
18 changed files with 441 additions and 15 deletions
@@ -0,0 +1,23 @@
{
"id": "f85285e3-111a-4a55-aa58-05fd740ed862",
"name": "timesheets",
"schema_fingerprint": "auto",
"objects": [
{
"bucket": "data",
"key": "datasets/timesheets.parquet",
"size_bytes": 17539932,
"created_at": "2026-03-28T01:54:11.947773535Z"
}
],
"created_at": "2026-03-28T01:54:11.947778065Z",
"updated_at": "2026-03-28T01:54:11.947778065Z",
"description": "",
"owner": "",
"sensitivity": null,
"columns": [],
"lineage": null,
"freshness": null,
"tags": [],
"row_count": null
}