Skip to content

Add postgres float 4 to pg dialect float4 support in bulk migration#3885

Open
sm745052 wants to merge 2 commits into
mainfrom
add-pg-float4-support-9270526303072825437
Open

Add postgres float 4 to pg dialect float4 support in bulk migration#3885
sm745052 wants to merge 2 commits into
mainfrom
add-pg-float4-support-9270526303072825437

Conversation

@sm745052

@sm745052 sm745052 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Add support for mapping pgFloat4 type in bulk migrations targeting Spanner. This correctly maps Avro to value mapping.


PR created automatically by Jules for task 9270526303072825437 started by @sm745052

Updated `AvroToValueMapper.java` to support `Type.pgFloat4()` in the `getPgMap()` method. It correctly maps the `pgFloat4` to Spanner `Value.float32`.

Co-authored-by: sm745052 <79754058+sm745052@users.noreply.github.com>
@sm745052 sm745052 requested a review from a team as a code owner June 4, 2026 07:53
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

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 updates the Avro to Spanner value mapping logic to include support for the PostgreSQL float4 data type. This ensures that data migration processes correctly handle 32-bit floating-point values when targeting Spanner.

Highlights

  • Added pgFloat4 support: Included support for mapping the pgFloat4 type in bulk migrations to ensure correct Avro to Spanner value conversion.
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 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 .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 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

  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.

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

Copy link
Copy Markdown
Contributor

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 adds support for mapping PostgreSQL float4 types to Spanner float32 values in the AvroToValueMapper class. I have no feedback to provide as there are no review comments to evaluate.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.28%. Comparing base (6cc1219) to head (185516d).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
.../v2/spanner/migrations/avro/AvroToValueMapper.java 66.66% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3885      +/-   ##
============================================
+ Coverage     55.54%   63.28%   +7.73%     
+ Complexity     6574     2315    -4259     
============================================
  Files          1103      514     -589     
  Lines         67570    29952   -37618     
  Branches       7581     3300    -4281     
============================================
- Hits          37531    18954   -18577     
+ Misses        27624    10035   -17589     
+ Partials       2415      963    -1452     
Components Coverage Δ
spanner-templates 88.71% <66.66%> (+0.40%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 90.13% <66.66%> (-0.09%) ⬇️
spanner-live-reverse-replication 83.90% <66.66%> (-0.07%) ⬇️
spanner-bulk-migration 92.56% <66.66%> (-0.06%) ⬇️
gcs-spanner-dv 90.36% <66.66%> (+1.35%) ⬆️
Files with missing lines Coverage Δ
.../v2/spanner/migrations/avro/AvroToValueMapper.java 93.88% <66.66%> (-0.29%) ⬇️

... and 614 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.

Co-authored-by: sm745052 <79754058+sm745052@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant