Uh oh!
There was an error while loading. Please reload this page.
fix: adding property setter for table constraints, #1990 - #2092
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Linchin
commented
Dec 20, 2024
Thank you @lkhagvadorj-amp for making the contribution! The PR looks great, but could you do the following things so we can merge it:
Thanks again and happy holidays! |
lkhagvadorj-amp
commented
Dec 23, 2024
@Linchin Happy to contribute and thank you for the initial review! I’ve pushed the testing changes—would be grateful if you could review them again. Happy holidays! |
Uh oh!
There was an error while loading. Please reload this page.
Linchin
commented
Jan 2, 2025
Thank you @lkhagvadorj-amp, I ran the test again, but it seems we need to fix several tests. I'm sorry that I have to trigger the presubmit tests manually, but you can run the system test locally by |
jmesterh
commented
Feb 14, 2025
Is this PR dead? Constraints are required for BigQuery CDC to function. |
@jmesterh I will work on this change on this weekend. |
b646533 to
3dcbeeaComparedd2c5ed to
62028bcComparelkhagvadorj-amp
commented
Feb 23, 2025
@Linchin Could you please take another look at my PR when you get a chance? |
Uh oh!
There was an error while loading. Please reload this page.
| def __eq__(self, other): | ||
| if not isinstance(other, TableConstraints) and other is not None: | ||
| raise TypeError("The value provided is not a BigQuery TableConstraints.") | ||
| return ( |
There was a problem hiding this comment.
I think we need to add a test case for this case
There was a problem hiding this comment.
added more test on eq under unit test
Linchin
commented
Feb 24, 2025
Hi @lkhagvadorj-amp thanks for updating the PR, from the tests it seems we need some additional test coverage, and need to fix linting. Could you update the PR so we can pass these tests? We are in the process of migrating our testing infra so there's a confusingly large number of tests that are failing, but for now the only ones that matter are "Kokoro" and "Kokoro linting-typing", and you can ignore the rest. |
Linchin
commented
Feb 25, 2025
Thanks @lkhagvadorj-amp, there's still a test failing in linting, could you fix it too? Here's the message: |
lkhagvadorj-amp
commented
Mar 3, 2025
@Linchin Please let me know if you have any additional comments. |
Linchin
left a comment
There was a problem hiding this comment.
LGTM, thank you for your contribution!
lkhagvadorj-amp
commented
Mar 5, 2025
@Linchin My apologies for too many commits and looping again and again. Happy to contribute! |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes#1990 🦕
Overview
This pull request introduces enhancements to the
google/cloud/bigquery/table.pyfile by adding setter methods and conversion functions. Additionally, a new unit test is added to ensure the functionality of the new setter method.Enhancements to
google/cloud/bigquery/table.py:table_constraintsto allow setting primary key and foreign key information.to_api_reprmethod to theForeignKeyclass to return a dictionary representation of the object.to_api_reprmethod to theTableConstraintsclass to return a dictionary representation of the object.Unit tests:
table_constraintsproperty setter to ensure it correctly updates the table properties.