-
Notifications
You must be signed in to change notification settings - Fork 240
feat(vscode): adding ability to update columns #5013
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
a0348cd
to
006fdc1
Compare
c574571
to
71885b8
Compare
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 adds the ability to update columns for external models in the VSCode extension through a new command. The feature allows users to click an "Update Columns" button in external model YAML files to automatically fetch and update column definitions from the database.
Key changes:
- Added a new LSP command
EXTERNAL_MODEL_UPDATE_COLUMNS
that updates external model columns - Implemented code lenses to display "Update Columns" buttons in external model YAML files
- Refactored schema loading logic to extract a reusable
get_columns
function
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
vscode/extension/tests/commands.spec.ts | New test file that validates the update columns functionality end-to-end |
vscode/extension/package.json | Added DuckDB dependency for testing database operations |
sqlmesh/lsp/reference.py | Refactored YAML model range finding and added function to get all model ranges |
sqlmesh/lsp/main.py | Added command handler and code lens feature for external model column updates |
sqlmesh/lsp/context.py | Implemented core logic for updating external model columns and generating code lenses |
sqlmesh/lsp/commands.py | Defined the new command constant |
sqlmesh/core/schema_loader.py | Extracted reusable get_columns function from existing code |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
vscode/extension/package.json:137
- The version '1.3.2-alpha.25' appears to be an alpha version. Consider using a stable release version instead of an alpha version for production dependencies.
"@duckdb/node-api": "1.3.2-alpha.25",
0ed67af
to
b6f84ab
Compare
b6f84ab
to
6e47ba0
Compare
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.
Looks ok, just a couple of comments.
No description provided.