Repository navigation
Conversation
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 enables support for PostgreSQL embedding-vector columns within the Spanner change-streams-to-BigQuery template. By updating the schema parsing utility to recognize and strip vector length constraints, the system can now successfully process tables containing vector data types without failing during worker setup. 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 parsing PostgreSQL vector types (e.g., real[] VECTOR LENGTH 512) and mapping them to Spanner array types in TypesUtils, along with corresponding unit tests. The reviewer suggested using a dummy type name instead of integer in the negative test case to prevent the test from becoming fragile if integer support is added in the future.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4169 +/- ##
============================================
+ Coverage 55.89% 56.37% +0.47%
- Complexity 7020 7413 +393
============================================
Files 1134 1155 +21
Lines 70098 73233 +3135
Branches 8006 8586 +580
============================================
+ Hits 39183 41286 +2103
- Misses 28371 29159 +788
- Partials 2544 2788 +244
🚀 New features to boost your workflow:
|
The negative vector-length test call exceeded the formatter's line length, which failed the Java PR Spotless check.
|
Wrapped the long |
Extend the PostgreSQL information-schema parser in
TypesUtilsto recognize the repository's existing embedding-vector grammar, isolate the array element type, and ignore the vector-length constraint when constructing the Cloud Spanner clientType, consistent with the utility's existing treatment of parameterized lengths. The Spanner change-streams-to-BigQuery template fails during worker setup when a PostgreSQL-dialect table tracked by the change stream contains an embedding-vector column such asreal[] VECTOR LENGTH 512.Convert
real[] vector length 512from PostgreSQL information schema and verify it produces an array ofFLOAT32, allowing schema setup for the reported embedding column; Convert a case-variedDOUBLE PRECISION[] VECTOR LENGTH 4and verify it produces an array ofFLOAT64, demonstrating that parsing follows the documented grammar rather than hard-coding the reported input.Fixes #4120