Conversation
…xploration
This commit implements the full integration of DuckLake into the SQL Editor, enabling
users to execute queries, explore schemas, and utilize IntelliSense for DuckLake
instances alongside traditional database connections.
Key features and improvements:
- SQL Editor Integration: Added support for 'ducklake' as a first-class connection type.
- Query Execution: Implemented backend routing to DuckLakeService for SQL execution,
including support for SELECT, DDL, and DML operations with command detection.
- Schema Explorer: Developed a professional MUI TreeView for DuckLake metadata,
displaying the schemas → tables → columns hierarchy with type-specific icons.
- Monaco completions: Created a dedicated IntelliSense provider for DuckLake-specific
system tables, metadata views, functions, and time-travel syntax.
- IPC Layer: Added new handlers for query execution, cancellation, and schema extraction.
- Critical Bug Fixes:
- Resolved metadata qualification issues by automatically prefixing internal
queries with the correct metadata database.
- Fixed a critical data normalization bug in the DuckDB adapter where string
values were being incorrectly converted to undefined.
- Corrected schema extraction queries to align with the DuckLake v0.3 specification.
- Fixed infinite loading states in the SQL screen for DuckLake connections.
- UI/UX Polish: Replaced custom lists with standardized components, added
theme-aware icons, and improved connection grouping in the sidebar.
Files changed:
- types: Updated backend, frontend, duckLake, and ipc definitions.
- services: Enhanced DuckLake main and frontend services with execution/extraction logic.
- adapters: Updated DuckDB, PostgreSQL, and SQLite adapters for data normalization.
- UI: Modified SqlEditor, SqlScreen sidebar, and icon Registries.
- utils: Added Monaco completion generator for DuckLake.
Add export button to query results toolbar with dropdown menu for JSON, CSV, and Parquet formats. JSON and CSV exports are client-side downloads, while Parquet export uses DuckDB/COPY command for DuckDB and DuckLake connections. Export is disabled when there are no results.
- Implement paginated query execution with limit/offset for DuckLake connections - Add server-side data fetching with custom pagination controls in query results table - Support query cancellation through adapter's getCancelFn method - Preserve original SQL across query execution and result display - Enhance table pagination with formatted number display and extended rows per page options - Adjust SQL screen layout to accommodate pagination controls
…and result display limits, and correct CSV value escaping.
… 10, and enable schema level display in the schema browser.
- Remove debug console logs across duckLake service, adapter, and SQL screen - Escape single quotes in schema names to prevent SQL injection in queries - Add recursive sanitization to convert BigInt values to Number in schema data - Add warnings and errors for presence of BigInt values during DuckDB adapter data processing - Skip regular schema loading for DuckLake connections to rely on custom extraction - Normalize numeric values including BigInt and hugeint objects in file utilities - Remove redundant console logs from SQL screen regarding DuckLake schema and completions state
…endering - Add sanitizeValue function to recursively convert BigInt to Number for IPC serialization - Remove unused snapshot and schema checks in adapter query - Add debug warnings for BigInt detection in raw DuckDB adapter rows - Log errors if BigInt remain after normalization in DuckDB adapter - Update QueryResult component to render null/undefined as italicized "NULL" - Improve cell rendering by stripping quotes from stringified JSON values
- Add isLoading state for DuckLake instances to manage loading status - Return a minimal connection object with instanceId when instance is not found - Prevent "Connection is still loading" errors when navigating back to SQL screen - Update dependencies of useMemo hook to include loading state of DuckLake instances
- Added 'TRUNCATE' and 'RENAME' commands to supported DDL operations - Changed detection to check statement start only, avoiding false positives - Simplified DDL keyword list to command verbs only for accurate matching - Removed specific table/view/schema suffixes from keyword checks
- Ensure LIMIT and OFFSET are appended for queries without existing limit - Skip applying LIMIT for queries with existing limits or non-SELECT statements - Clarify handling of LIMIT clause for DML/DDL queries to avoid invalid syntax
…ling - Refactor isDDLOperation to use startsWith for precise DDL detection - Add error toast when no connection is selected in connection mode - Add info toast if DuckLake connection is still loading and block query run - Prevent error toast duplicate by refining loading state checks - Show error when no connection or project is selected outside connection mode - Limit DuckLake query results only for SELECT commands using getCommandType - Clean up redundant code and improve query execution flow for DuckLake connections
- Add refetch function for DuckLake instances in useHook response - Trigger refetch when active tab connection ID changes for DuckLake - Display connection not found message if DuckLake instance is loading but missing - Provide retry button to allow manual refetch of DuckLake instances - Style connection error UI with centered box and descriptive text
…ter data processing, and qualify metadata tables for SQLite.
…s and add export progress UI.
… for parquet export operations.
…with JSON.stringify and fall back to String(), and use String() for non-object types.
… result fetching using a sequence ref.
…ing any query suffixes in database adapters.
…it` is specified.
…ctionality and prevent SQL editor cursor jumps by optimizing initial query handling.
…rizontal padding, bottom border, and box-sizing.
Replace JSON.stringify on raw DuckDB result rows with a BigInt-safe stringify helper in extractSchema so debug logging won’t throw when rows contain BigInt. Applies to both the schemas and tables “first raw row” logs.
Include MERGE in detectCommandType() DML keyword checks so MERGE queries aren't misclassified as SELECT.
Replace console.error in the BigInt post-normalization diagnostic loop with electron-log, and omit the raw cell value from the message to prevent sensitive data leakage. Log only row index and column key.
…vel clause Ensure snapshotId is digits-only before interpolating into FOR SYSTEM_TIME AS OF SNAPSHOT to prevent SQL injection; throw DuckLakeError.validation on invalid values.
Prevent SQL injection by rejecting non-numeric snapshotId values before appending `FOR SYSTEM_TIME AS OF SNAPSHOT` to the query.
…llisions - Gate DuckLake QueryResult page fetches until the instance is ready to avoid executeQuery failures on refresh - Dedupe DuckLake/DB completions using a composite key (label + kind + detail + insertText) so common labels (e.g. "id") don’t collide, while keeping DuckLake precedence
- connectors.service.ts: use path.basename for cross-platform baseName derivation - queryResult.tsx: resolve Parquet export guard SQL fallback consistently - duckLake.service.ts: allow EXPLAIN and VACUUM in query validation - duckdb.adapter.ts: validate snapshotId to prevent SQL injection - duckLakeCompletions.ts: use Monaco CompletionItemKind enum constants instead of hard-coded numbers
- add `showSearch` flag to CustomTable/CustomTableToolbar - disable search input in SQL QueryResult table to avoid broken behavior
Feature: Implement DuckLake integration with query execution, schema extraction, and metadata handling
added support to duplicate existing connections
version bump: 1.3.2
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
No description provided.