test: add integration test for PostgreSQL partitioned tables#4018
Conversation
9fed72d to
319837e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4018 +/- ##
============================================
+ Coverage 55.70% 63.49% +7.78%
+ Complexity 7236 2508 -4728
============================================
Files 1124 535 -589
Lines 68447 30720 -37727
Branches 7721 3420 -4301
============================================
- Hits 38127 19505 -18622
+ Misses 27846 10202 -17644
+ Partials 2474 1013 -1461
🚀 New features to boost your workflow:
|
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 a comprehensive end-to-end integration test suite to ensure the SourceDbToSpanner template correctly handles PostgreSQL partitioned tables. By validating multiple partitioning schemes and both Spanner dialects, the changes improve the reliability of database migrations involving complex table structures. 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 introduces a new integration test, PostgreSQLPartitionedTablesIT, along with corresponding SQL schemas to verify the migration of PostgreSQL partitioned tables (range, list, and hash partitions) to both GoogleSQL and PostgreSQL dialect Spanner databases. The code review feedback identifies two key issues: first, the static declaration of the jobInfo field should be replaced with local variables within each test method to prevent potential race conditions; second, the third parameter of launchDataflowJob is incorrectly supplied with a comma-separated list of tables instead of a proper GCS path prefix.
319837e to
01ee230
Compare
Added a new end-to-end integration test (PostgreSQLPartitionedTablesIT) to verify that the SourceDbToSpanner template correctly migrates partitioned tables from a PostgreSQL source into Cloud Spanner.
It validates data ingestion for all three PostgreSQL partitioning strategies across both GoogleSQL and PostgreSQL Spanner dialects: