-
Notifications
You must be signed in to change notification settings - Fork 17
feat: context menu to create a vector index #3155
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
base: main
Are you sure you want to change the base?
Conversation
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.
4 files reviewed, 1 comment
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 a context menu option to create vector indexes on tables in the YDB Embedded UI. The feature provides users with a template SQL query for creating vector indexes using the vector_kmeans_tree method with configurable parameters.
Key changes:
- Adds
addVectorIndexTemplatefunction that generates SQL for creating vector indexes - Integrates the new action into schema context menus and SQL query action menus
- Includes proper internationalization for menu items in English
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/containers/Tenant/utils/schemaQueryTemplates.ts | Adds addVectorIndexTemplate function to generate vector index creation SQL with documentation link and configurable parameters |
| src/containers/Tenant/utils/schemaActions.tsx | Imports and wires up the vector index template to the schema tree context menu actions |
| src/containers/Tenant/utils/newSQLQueryActions.ts | Imports and binds the vector index template to SQL query editor action menu |
| src/containers/Tenant/i18n/en.json | Adds English i18n key actions.addVectorIndex for the context menu item |
| src/containers/Tenant/Query/NewSQL/i18n/en.json | Adds English i18n key action.add-vector-index for the SQL editor menu item |
| src/containers/Tenant/Query/NewSQL/NewSQL.tsx | Adds the vector index action to the SQL editor's action menu |
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.
4 files reviewed, no comments
Closes #2532
Greptile Overview
Greptile Summary
Added context menu option to create vector indexes on row tables. The implementation follows existing patterns consistently across the codebase.
addVectorIndexquery template with comprehensive SQL example usingvector_kmeans_treealgorithmConfidence Score: 5/5
Important Files Changed
File Analysis
addVectorIndextemplate function with comprehensive SQL example for creating vector indexesaddVectorIndexaction into schema context menu for row tablesaddVectorIndextemplate to action in SQL query actionsSequence Diagram
sequenceDiagram participant User participant ContextMenu participant Actions participant QueryTemplate participant SQLEditor User->>ContextMenu: Right-click table in schema tree ContextMenu->>ContextMenu: Display "Add vector index..." option User->>ContextMenu: Click "Add vector index..." ContextMenu->>Actions: Call addVectorIndex action Actions->>QueryTemplate: Call addVectorIndex(params) QueryTemplate->>QueryTemplate: Generate SQL template with placeholders Note over QueryTemplate: Uses table path from params<br/>or ${1:<my_table>} placeholder QueryTemplate-->>Actions: Return SQL template string Actions->>SQLEditor: Insert SQL template into editor SQLEditor->>User: Display editable SQL with tab stops Note over User,SQLEditor: User can tab through placeholders:<br/>${2:my_vector_index}, ${3:embedding},<br/>${4:512}, ${5:2}, ${6:128}CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 62.33 MB | Main: 62.33 MB
Diff: +1.86 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information