Skip to content

Conversation

@gpalanisamyYopp
Copy link
Contributor

No description provided.

@google-cla
Copy link

google-cla bot commented Dec 3, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link

Summary of Changes

Hello @gpalanisamyYopp, 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 introduces the capability to handle MySQL BOOL data types during schema discovery and data migration to Spanner. It ensures that BOOL columns are correctly identified and mapped to an appropriate numeric type (INT64) in the target Spanner database, accompanied by thorough testing to confirm the integrity of this mapping. This enhancement improves the compatibility and robustness of the migration tool for MySQL databases.

Highlights

  • MySQL BOOL Type Support: Added support for mapping MySQL's BOOL data type to NUMERIC (specifically INT64 in Spanner) within the data migration process.
  • Dialect Adapter Update: The MysqlDialectAdapter has been updated to correctly identify BOOL columns and assign them the NUMERIC index type during schema discovery.
  • Comprehensive Testing: New unit tests and integration tests have been introduced to validate the correct handling and mapping of BOOL types, including the creation of a bool_pk_table and insertion of boolean values.
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.

@gpalanisamyYopp gpalanisamyYopp force-pushed the source-to-spanner-mysql-bool-pk branch from 5434b95 to 0302648 Compare December 3, 2025 17:13
@VardhanThigle
Copy link
Contributor

Please resolve the merge conflicts and fix the spotless and checksyle issues.

VardhanThigle
VardhanThigle previously approved these changes Dec 8, 2025
Copy link
Contributor

@VardhanThigle VardhanThigle left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Do you think the PR could be titled Adding support for Bool as a parimary key or Bool as a parimary key by mapping it to IndexType.Numeric

This removed confusion with other interpretations of Numeric.

@VardhanThigle
Copy link
Contributor

Spotless still needs to be fixed.

@VardhanThigle VardhanThigle changed the title support BOOL type mapped as NUMERIC (Int64) Support for Bool as a parimary key Dec 9, 2025
@VardhanThigle VardhanThigle changed the title Support for Bool as a parimary key Support for Bool as a primary key Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.65%. Comparing base (301cd41) to head (ce23992).
⚠️ Report is 24 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3045      +/-   ##
============================================
+ Coverage     50.41%   55.65%   +5.24%     
+ Complexity     5022     1614    -3408     
============================================
  Files           970      468     -502     
  Lines         59606    26362   -33244     
  Branches       6506     2771    -3735     
============================================
- Hits          30051    14673   -15378     
+ Misses        27434    10798   -16636     
+ Partials       2121      891    -1230     
Components Coverage Δ
spanner-templates 71.62% <100.00%> (+0.97%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 80.03% <ø> (ø)
spanner-live-reverse-replication 77.46% <ø> (ø)
spanner-bulk-migration 88.25% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...jdbc/dialectadapter/mysql/MysqlDialectAdapter.java 99.62% <100.00%> (+<0.01%) ⬆️

... and 521 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@VardhanThigle
Copy link
Contributor

Spotless still needs to be fixed.

@VardhanThigle
Copy link
Contributor

PLease fix the integration test.

@VardhanThigle
Copy link
Contributor

Please rebase the PR on top of the tree to get the integration tests to passing state.

@nmemond
Copy link
Contributor

nmemond commented Dec 15, 2025

I unfortunately don't have permissions to push to the fork and the developer that owns this is out of office for the rest of the year. I've re-created the PR but up-to-date with main in #3112.

@VardhanThigle
Copy link
Contributor

Closing this as #3112 is raised to cover this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants