Skip to content

Drill-XXXX: Refactor User Interface#3037

Draft
cgivre wants to merge 83 commits intoapache:masterfrom
cgivre:feature/sqllab-react-ui
Draft

Drill-XXXX: Refactor User Interface#3037
cgivre wants to merge 83 commits intoapache:masterfrom
cgivre:feature/sqllab-react-ui

Conversation

@cgivre
Copy link
Contributor

@cgivre cgivre commented Feb 6, 2026

DRILL-XXXX: Refactor User Interface

Description

This PR refactors Drill's UI and refactors the Query view, adds visualizations and dashboards and in general makes Drill much more user friendly.

Screenshot 2026-02-06 at 10 36 16 Screenshot 2026-02-06 at 10 36 23 Screenshot 2026-02-06 at 10 36 30 Screenshot 2026-02-06 at 10 36 40

Documentation

(Please describe user-visible changes similar to what should appear in the Drill documentation.)

Testing

(Please describe how this PR has been tested.)

@cgivre cgivre self-assigned this Feb 6, 2026
@cgivre cgivre changed the title User Interface Improvements Drill-XXXX: Refactor User Interface Feb 6, 2026
@cgivre cgivre added enhancement PRs that add a new functionality to Drill doc-impacting PRs that affect the documentation ui PRs relating to the User Interface major-update labels Feb 6, 2026
@cgivre cgivre force-pushed the feature/sqllab-react-ui branch from 080ba0b to 36af30f Compare March 9, 2026 13:45
cgivre added 4 commits March 11, 2026 16:46
Implement file-based query result caching for SQL Lab that persists
across Drill restarts. Results are stored as JSON on disk with LRU
eviction, configurable TTL, and per-result size limits.

Security measures:
- UUID-only cacheId validation to prevent path traversal
- User isolation: users can only access their own cached results
- Admin-only stats endpoint to prevent filesystem path disclosure
- Content-Disposition filename sanitization
- Paginated row limit clamping (max 50K per request)

REST API at /api/v1/results:
- POST /store — cache query results
- GET /{cacheId} — metadata
- GET /{cacheId}/rows?offset=&limit= — paginated rows
- GET /{cacheId}/download?format=csv|json — streaming export
- DELETE /{cacheId} — evict entry
- GET /stats — cache statistics (admin only)

Includes 28 unit tests (19 functional + 9 security).
Rewrite the in-browser result cache with LRU eviction, configurable
memory budget (50MB/10 entries default), and backend cache integration.
After query execution, results are fire-and-forget cached to the backend
for persistence across browser reloads and Drill restarts.

Changes:
- Rewrite resultsCache.ts: LRU Map, memory estimation, cacheId tracking
- Add resultCache.ts API client for backend cache endpoints
- Add cacheId to Redux QueryTab state and workspace persistence
- useQuery.ts: store results to backend, dispatch setCacheId
- useWorkspacePersistence.ts: restore from backend when local cache misses
- ResultsGrid exports use backend streaming when cacheId available

Includes 37 frontend tests (21 cache + 16 API).
For results exceeding 10K rows with a backend cacheId, application-level
pagination fetches pages from the server while AG Grid retains client-side
sorting and filtering within the loaded page. This prevents browser memory
exhaustion for large query results without requiring AG Grid Enterprise.

New components:
- useServerPagination hook: manages page state, fetches from backend cache
- ServerPaginationBar: first/prev/next/last buttons, page size selector,
  row range indicator with server-cloud icon

ResultsGrid integration:
- displayResults switches between local and server-paginated data
- Toolbar shows total row count from server metadata
- All column/copy/export operations use displayResults

Includes 9 tests for the server pagination hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-impacting PRs that affect the documentation enhancement PRs that add a new functionality to Drill major-update ui PRs relating to the User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant