Skip to content

feat(fuzzy-finder): add table completion for MUTATE statement#515

Merged
apstndb merged 1 commit intomainfrom
issue-512-mutate-fuzzy-completion
Feb 24, 2026
Merged

feat(fuzzy-finder): add table completion for MUTATE statement#515
apstndb merged 1 commit intomainfrom
issue-512-mutate-fuzzy-completion

Conversation

@apstndb
Copy link
Owner

@apstndb apstndb commented Feb 24, 2026

Summary

Add fuzzy table completion to the MUTATE statement, so MUTATE <Ctrl+T> triggers fuzzy table selection.

Key Changes

  • client_side_statement_def.go: Add Completion field with fuzzyCompleteTable to the MUTATE statement definition
  • fuzzy_finder_test.go: Add test cases for MUTATE table completion (trailing space and partial table name)

Test Plan

  • make check passes
  • Manual testing completed — MUTATE <Ctrl+T> opens fuzzy finder with table candidates

Fixes #512

Add fuzzyCompleteTable to MUTATE statement definition so that
MUTATE <Ctrl+T> triggers fuzzy table selection, following the
same pattern as TRUNCATE TABLE and SHOW COLUMNS FROM.

Fixes #512

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @apstndb, 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 enhances the command-line interface by introducing fuzzy table completion for the MUTATE statement. This improvement allows users to more efficiently select tables when constructing MUTATE commands, streamlining the interaction and reducing potential errors by providing intelligent suggestions.

Highlights

  • Fuzzy Table Completion for MUTATE: Implemented fuzzy table completion for the MUTATE statement, allowing users to trigger fuzzy table selection with MUTATE <Ctrl+T>.
  • Statement Definition Update: Modified client_side_statement_def.go to include a Completion field with fuzzyCompleteTable for the MUTATE statement definition.
  • Test Coverage: Added new test cases in fuzzy_finder_test.go to validate MUTATE table completion, covering scenarios with trailing spaces and partial table names.
Changelog
  • internal/mycli/client_side_statement_def.go
    • Added a Completion field to the MUTATE statement definition.
    • Configured fuzzyCompleteTable for MUTATE statements using a regular expression to match the prefix pattern.
  • internal/mycli/fuzzy_finder_test.go
    • Introduced new test cases for MUTATE statements to verify fuzzy table completion.
    • Included tests for MUTATE with a trailing space and MUTATE with a partial table name.
Activity
  • The author confirmed that make check passes.
  • Manual testing was completed, verifying that MUTATE <Ctrl+T> correctly opens the fuzzy finder with table candidates.
  • The pull request addresses issue Fuzzy completion: MUTATE <table> statement #512.
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@github-actions
Copy link

Code Metrics Report

📊 View detailed coverage report (available for 7 days)

main (3b1195d) #515 (4d7c1b2) +/-
Coverage 68.2% 68.2% 0.0%
Code to Test Ratio 1:1.2 1:1.2 +0.0
Test Execution Time 2m9s 1m7s -1m2s
Details
  |                     | main (3b1195d) | #515 (4d7c1b2) |  +/-  |
  |---------------------|----------------|----------------|-------|
  | Coverage            |          68.2% |          68.2% |  0.0% |
  |   Files             |             55 |             55 |     0 |
  |   Lines             |           5912 |           5912 |     0 |
  |   Covered           |           4036 |           4036 |     0 |
+ | Code to Test Ratio  |          1:1.2 |          1:1.2 |  +0.0 |
  |   Code              |          13570 |          13574 |    +4 |
+ |   Test              |          16914 |          16928 |   +14 |
+ | Test Execution Time |           2m9s |           1m7s | -1m2s |

Code coverage of files in pull request scope (79.9% → 79.9%)

Files Coverage +/- Status
internal/mycli/client_side_statement_def.go 79.9% 0.0% modified

Reported by octocov

Copy link
Contributor

@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

The pull request successfully adds fuzzy table completion for the MUTATE statement, which is a valuable enhancement for user productivity. The implementation follows the existing patterns in the codebase and includes appropriate test cases. The previously identified high-severity issue regarding the MUTATE statement's main regex pattern has been re-evaluated against repository rules and found to be acceptable, as the pattern's purpose is to trigger completion, not to fully parse complex identifiers like quoted or spaced names (Rule 5).

@apstndb apstndb added the enhancement New feature or request label Feb 24, 2026
@apstndb apstndb merged commit 4beb392 into main Feb 24, 2026
2 checks passed
@apstndb apstndb deleted the issue-512-mutate-fuzzy-completion branch February 24, 2026 19:06
@apstndb apstndb added the fuzzy-finder Fuzzy finder (fzf) completion features label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fuzzy-finder Fuzzy finder (fzf) completion features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fuzzy completion: MUTATE <table> statement

1 participant