feat(vscode): adding ability to update columns#5013
Merged
Conversation
a0348cd to
006fdc1
Compare
benfdking
commented
Jul 24, 2025
c574571 to
71885b8
Compare
Contributor
There was a problem hiding this comment.
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_COLUMNSthat 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_columnsfunction
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
benfdking
commented
Jul 29, 2025
benfdking
commented
Jul 29, 2025
b6f84ab to
6e47ba0
Compare
georgesittas
approved these changes
Jul 29, 2025
Contributor
georgesittas
left a comment
There was a problem hiding this comment.
Looks ok, just a couple of comments.
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.