feat: add support for UUID and PG_UUID types across Spanner migration utilities.#3905
feat: add support for UUID and PG_UUID types across Spanner migration utilities.#3905pratickchokhani wants to merge 2 commits into
Conversation
2481637 to
6b26c9e
Compare
6b26c9e to
f4ad6ae
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3905 +/- ##
============================================
- Coverage 55.59% 55.57% -0.02%
- Complexity 7052 7056 +4
============================================
Files 1103 1103
Lines 67681 67753 +72
Branches 7603 7611 +8
============================================
+ Hits 37625 37657 +32
- Misses 27636 27672 +36
- Partials 2420 2424 +4
🚀 New features to boost your workflow:
|
b2bd219 to
4566208
Compare
7924f38 to
368d1c1
Compare
368d1c1 to
6039a06
Compare
Summary of ChangesHello, 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 first-class support for UUID and PG_UUID data types within the Spanner migration framework. By updating the core type system, mapping logic, and conversion utilities, the changes ensure that UUID fields are correctly identified, mapped, and processed during data migration tasks. These updates improve the robustness of the migration pipeline when dealing with UUID-based schemas. Highlights
Using Gemini Code AssistThe 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
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the UUID and PG_UUID data types across several Spanner-related templates and common utilities, including schema parsing, Avro mapping, and change event conversion. A critical compilation issue was identified in AssignShardIdFn.java, where value.getUuid() is called on a Spanner Value object. Since the Spanner Java SDK does not have a getUuid() method, this must be updated to use value.getString() instead.
| case UUID: | ||
| case PG_UUID: | ||
| return value.getUuid(); |
There was a problem hiding this comment.
The com.google.cloud.spanner.Value class does not have a getUuid() method. In the Cloud Spanner Java SDK, UUID values are retrieved as strings. Calling value.getUuid() will cause a compilation error. Please use value.getString() instead.
| case UUID: | |
| case PG_UUID: | |
| return value.getUuid(); | |
| case UUID: | |
| case PG_UUID: | |
| return value.getString(); |
There was a problem hiding this comment.
No. For UUID, we are receiving UUID value instead.
No description provided.