FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add decimal validation for numeric precision and scale supported by Spanner by vi3k6i5 · Pull Request #340 · googleapis/python-spanner · GitHub

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
/ python-spanner Public archive

feat: add decimal validation for numeric precision and scale supported by Spanner - #340

Merged
vi3k6i5 merged 13 commits into
googleapis:masterfrom
vi3k6i5:decimal_support
May 18, 2021
Merged

vi3k6i5 merged 13 commits into
googleapis:masterfrom
vi3k6i5:decimal_support

Conversation

vi3k6i5 commented May 12, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

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

vi3k6i5 requested a review from a team May 12, 2021 10:27
product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label May 12, 2021
google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label May 12, 2021
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

olavloite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 commented May 14, 2021

Copy link
Copy Markdown
Contributor Author

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 requested a review from larkee May 14, 2021 16:17
Comment thread google/cloud/spanner_v1/_helpers.py Outdated
Comment thread google/cloud/spanner_v1/_helpers.py Outdated
Comment thread google/cloud/spanner_v1/_helpers.py Outdated
Comment thread tests/unit/test__helpers.py Outdated
vi3k6i5 requested a review from larkee May 17, 2021 07:37

larkee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

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 merged commit aa36c5e into googleapis:master May 18, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add validation in decimal to numeric conversion

3 participants


Back | FazBrowse Home | New Git URL