Add Foreign Key ON DELETE SET NULL support for Cloud Spanner Avro tem… - #4152
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 introduces support for the 'ON DELETE SET NULL' referential action within the Cloud Spanner DDL management components. The changes ensure that this action is correctly parsed, represented, and serialized during DDL and Avro schema conversions, while also updating random DDL generation for testing purposes. 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 ON_DELETE_SET_NULL referential action for foreign keys in Cloud Spanner DDL, moving it from the unsupported to the supported actions list and updating parsing, pretty printing, and test cases. However, the reviewer identified two critical issues in AvroSchemaToDdlConverterTest.java where tests will fail due to incomplete updates: in simple(), the expected output was updated without updating the input Avro schema, and in pgSimple(), the input was updated without updating the corresponding assertion.
1843779 to
e455c29
Compare
|
Fixed test failure. |
e455c29 to
56e9aec
Compare
|
I didn't see any Integration tests? I believe it's because the feature is not launched in Spanner. How about create a tracking bug and linking it as TODO? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4152 +/- ##
=============================================
+ Coverage 35.83% 56.16% +20.33%
- Complexity 711 6974 +6263
=============================================
Files 250 1129 +879
Lines 17131 69322 +52191
Branches 1750 7850 +6100
=============================================
+ Hits 6139 38937 +32798
- Misses 10479 27891 +17412
- Partials 513 2494 +1981
🚀 New features to boost your workflow:
|
Yes, that's correct. Since the feature is not launched yet, I didn't add integration test. Added a TODO with tracking bug id. |
56e9aec to
3eab417
Compare
…plate