Skip to content

Conversation

vi3k6i5
Copy link
Contributor

@vi3k6i5 vi3k6i5 commented May 12, 2021

feat: add decimal validation for numeric precision and scale supported by spanner
Fixes #339 🦕

@vi3k6i5 vi3k6i5 requested a review from a team as a code owner May 12, 2021 10:27
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label May 12, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 12, 2021
@vi3k6i5 vi3k6i5 added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels May 12, 2021
Copy link
Contributor

@olavloite olavloite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to my untrained Python eyes, with a small question on whether it is logical to call the validate function for all values, or whether it would be better to move the if-check for the type out of the validation function.
(You should in any case await approval from other reviewers before merging)

@vi3k6i5
Copy link
Contributor Author

vi3k6i5 commented May 14, 2021

This seems good to my untrained Python eyes, with a small question on whether it is logical to call the validate function for all values, or whether it would be better to move the if-check for the type out of the validation function.
(You should in any case await approval from other reviewers before merging)

moved the method after a check. and also moved it to base client as @larkee suggested.

@vi3k6i5 vi3k6i5 requested a review from larkee May 14, 2021 16:17
@vi3k6i5 vi3k6i5 requested a review from larkee May 17, 2021 07:37
Copy link
Contributor

@larkee larkee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 You could remove test_w_numeric if you wanted since test_w_numeric_precision_and_scale_valid should have more coverage.

@larkee larkee changed the title feat: add decimal validation for numeric precission and scale supported by spanner feat: add decimal validation for numeric precision and scale supported by Spanner May 17, 2021
@vi3k6i5 vi3k6i5 merged commit aa36c5e into googleapis:master May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement.

3 participants