Skip to content

feat: query pagination (backport #1010)#1022

Merged
nextchamp-saqib merged 14 commits intoversion-3-hotfixfrom
backport-backend-pagination
Mar 31, 2026
Merged

feat: query pagination (backport #1010)#1022
nextchamp-saqib merged 14 commits intoversion-3-hotfixfrom
backport-backend-pagination

Conversation

@nextchamp-saqib
Copy link
Copy Markdown
Member

@nextchamp-saqib nextchamp-saqib commented Mar 31, 2026

backport #1010

- Keep TableChart mounted during execution (remove !loading guard) to
  prevent filter state loss and UI flash
- Add parseFilterString/matchesFilter helpers shared by client-side and
  server-side filter paths
- QueryDataTable falls back to client-side filtering when all rows fit
  on one page; pushes adhoc filters to backend otherwise
- Fix multi-column filter bug (rules were overwritten per iteration)
- Add execution token to discard stale paginated responses
- Show subtle tbody opacity dim while filtering instead of full progress bar
- Cast numeric columns to string before applying contains/not_contains in ibis
…value

Synthesizing totalRowCount from previewRowCount caused pagination to
incorrectly treat partial pages as the final page in server-paged mode.
usePagination already falls back to rowCount < pageSize when totalRowCount
is undefined, so returning undefined is sufficient and correct.
Returning self.query unconditionally caused older saved queries/charts
that contain a limit operation to silently produce unbounded result sets.
apply_limit now applies query.limit(n) as before; execute_ibis_query
then paginates on top of that via its own LIMIT/OFFSET, which is the
correct layering (dataset size capped by limit op, page sliced within).
Whitelisted endpoints receive values as strings; page was used raw,
causing TypeError on string multiplication and potential negative
offsets. Both params are now cast to int with a safe fallback and
clamped to valid ranges before computing LIMIT/OFFSET. The page_size
guard is also removed so 0/None is treated as the default (100) rather
than bypassing pagination entirely.
(cherry picked from commit 8724803)
(cherry picked from commit 3eef811)
@nextchamp-saqib nextchamp-saqib merged commit ec2e645 into version-3-hotfix Mar 31, 2026
3 checks passed
@mergify mergify bot deleted the backport-backend-pagination branch March 31, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant