Skip to content

feat: add Spanner and CloudSQL support to value search generation#50

Merged
hardikgu23 merged 8 commits intomainfrom
feature/value-index-queries-v2
Apr 2, 2026
Merged

feat: add Spanner and CloudSQL support to value search generation#50
hardikgu23 merged 8 commits intomainfrom
feature/value-index-queries-v2

Conversation

@hardikgu23
Copy link
Copy Markdown
Collaborator

@hardikgu23 hardikgu23 commented Mar 26, 2026

feat(value-search): extend support to Spanner, MySQL, and Postgres

This PR expands the value search generation feature to support additional database engines.

Changes included:

  • Added support for Google SQL (Spanner)
  • Added support for Cloud SQL (MySQL and PostgreSQL)
  • Updated the prompt workflow to dynamically infer the database engine
  • Added engine-specific parameters and SQL match templates

Previously, this feature was only supported for AlloyDB.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the system's compatibility by extending support to MySQL and Google SQL (Spanner) databases. The changes involve updating the user interaction prompts to dynamically infer database engines and collect necessary engine-specific parameters, ensuring that the value search generation process can adapt to the unique requirements of these new database types. This expansion allows for a broader range of data sources to leverage the value search capabilities.

Highlights

  • Expanded Database Support: Added support for MySQL and Google SQL (Spanner) databases, alongside the existing PostgreSQL/AlloyDB support, by introducing new dialect configurations and match templates.
  • Dynamic Database Engine Inference: Updated the prompt workflow to infer the database engine (e.g., postgresql, mysql, googlesql) based on the user-provided database type, streamlining the configuration process.
  • Engine-Specific Parameter Handling: Implemented logic to collect and pass engine-specific parameters, such as 'Column Tokens' for Spanner trigram matching and 'Column Embedding' for MySQL semantic matching, to the generate_value_searches tool.
  • New Match Templates: Introduced new SQL match templates for MySQL and Google SQL dialects, including exact string matching, trigram string matching, and semantic string matching (for MySQL).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly expands the targeted value search functionality by supporting additional database types: PostgreSQL, MySQL, and Spanner. The workflow has been updated to infer the database engine from the provided database type, and new engine-specific parameters have been introduced for Spanner and MySQL. Corresponding SQL templates for GOOGLE_SQL and MYSQL dialects have been added, and the generate_value_searches function now handles these new parameters. Review feedback suggests adding a final newline to mcp/prompts/targeted_value_search.py for PEP 8 compliance, including the table name in the columns field for new GOOGLE_SQL and MYSQL templates for consistency, and simplifying the MySQL TRIGRAM_STRING_MATCH and SEMANTIC_STRING_MATCH templates by removing redundant outer SELECT * FROM (...) AS wrapped_query wrappers.

Comment thread mcp/value_search/match_templates.py
@hardikgu23 hardikgu23 requested a review from wangauone March 30, 2026 09:58
Copy link
Copy Markdown
Collaborator

@wangauone wangauone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the PR title and desc to the format of https://www.conventionalcommits.org/en/v1.0.0/. So the release automation pipeline can help us bump the version automatically after merged.

Comment thread mcp/prompts/targeted_value_search.py Outdated
Comment thread mcp/prompts/targeted_value_search.py
Comment thread mcp/prompts/targeted_value_search.py Outdated
Comment thread mcp/prompts/targeted_value_search.py Outdated
Comment thread mcp/value_search/generator.py
Comment thread mcp/prompts/targeted_value_search.py Outdated
@hardikgu23 hardikgu23 changed the title Add support for other databases feat: add Spanner and CloudSQL support to value search generation Apr 1, 2026
Comment thread mcp/prompts/targeted_value_search.py Outdated
Copy link
Copy Markdown
Collaborator

@wangauone wangauone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hardikgu23 hardikgu23 merged commit 5a56582 into main Apr 2, 2026
3 checks passed
@hardikgu23 hardikgu23 deleted the feature/value-index-queries-v2 branch April 2, 2026 08:21
wangauone pushed a commit that referenced this pull request Apr 2, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.4.3](v0.4.2...v0.4.3)
(2026-04-02)


### Features

* add Spanner and CloudSQL support to value search generation
([#50](#50))
([5a56582](5a56582))
* **value-search:** extend support to Spanner, MySQL, and Postgres
([5a56582](5a56582))


### Bug Fixes

* **build:** disable strip and upx to resolve windows pyinstaller crash
([#52](#52))
([e07c52b](e07c52b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants