-
Notifications
You must be signed in to change notification settings - Fork 113
data explorer: duckdb sql backend for convert to code #9138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
E2E Tests 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements DuckDB SQL backend support for the "convert to code" feature in the data explorer. The change enables users to convert their current data explorer view (including filters and sorts) into executable SQL code that can be copied and run in Python with DuckDB.
Key changes:
- Added support for converting data explorer state to SQL code
- Implemented code syntax suggestion functionality
- Updated backend state to indicate convert-to-code support
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
extensions/positron-duckdb/src/extension.ts | Implements convert-to-code functionality with SQL generation and adds RPC handler support |
extensions/positron-duckdb/src/test/extension.test.ts | Updates test expectations to reflect convert-to-code support status |
convert_to_code: { | ||
support_status: SupportStatus.Supported, | ||
code_syntaxes: [{ | ||
code_syntax_name: "SQL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by default, it doesn't seem like there is syntax highlighting available unless you have an extension with a sql lsp
Do you want to try to add some extension tests? I can also add some in a follow up PR. The code changes look good to me though |
I can add some extension tests! It looks like there are context files for |
Since we store the active where and sort clauses, we can probably just reuse them to show to users. Since these are what is filtering/sorting the data explorer, I assume they won't be stale. I haven't dug around too much to see if there are any other drawbacks to reusing these, but it does make this feature quite simple!
Release Notes
New Features
Bug Fixes
QA Notes
positron-qa-examples
pip install duckdb