Draft
Conversation
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/SqlLabSpaServlet.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/SqlLabSpaServlet.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DashboardResources.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DashboardResources.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/resources/webapp/src/pages/DashboardViewPage.tsx
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/resources/webapp/src/pages/DashboardViewPage.tsx
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/resources/webapp/src/pages/DashboardViewPage.tsx
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DashboardResources.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/resources/webapp/src/components/results/ResultsGrid.tsx
Fixed
Show fixed
Hide fixed
080ba0b to
36af30f
Compare
exec/java-exec/src/main/resources/webapp/src/components/notebook/NotebookPanel.tsx
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/resources/webapp/src/components/notebook/NotebookPanel.tsx
Fixed
Show fixed
Hide fixed
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.
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/ResultCacheService.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/ResultCacheService.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/ResultCacheService.java
Fixed
Show fixed
Hide fixed
exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/ResultCacheService.java
Fixed
Show fixed
Hide fixed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Documentation
(Please describe user-visible changes similar to what should appear in the Drill documentation.)
Testing
(Please describe how this PR has been tested.)