GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add decimal validation for numeric precision and scale supported by Spanner by vi3k6i5 · Pull Request #340 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Conversation

@vi3k6i5

@vi3k6i5 vi3k6i5 commented May 12, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vi3k6i5 added 9 commits March 16, 2021 12:15
@vi3k6i5
Merge pull request #2 from googleapis/master
d0f6d41
Merging from original repo to update fork.
@vi3k6i5
Merge pull request #3 from googleapis/master
d051236
docs: fix docstring types and typos (#259)
@vi3k6i5
Merge pull request #4 from googleapis/master
b3b9805
updating repo from source.
@vi3k6i5
Merge pull request #5 from googleapis/master
0ca3deb
updating with source master.
@vi3k6i5
feat: updated googleapis proto changes for request tags
80a8240
@vi3k6i5
Merge pull request #6 from googleapis/master
b200cdb
update master branch from source branch.
@vi3k6i5
Merge pull request #7 from googleapis/master
b8b4827
feat: added support for numeric field for python decimal value (#316)
@vi3k6i5
Merge branch 'googleapis:master' into master
222921c
@vi3k6i5
Merge branch 'googleapis:master' into master
42cc4ba
@vi3k6i5
vi3k6i5 requested a review from a team 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
vi3k6i5 added 3 commits May 12, 2021 16:24
@vi3k6i5
Merge branch 'googleapis:master' into master
ed9b8f1
@vi3k6i5
feat: added support for numberic for python decimal value
a4bb797
@vi3k6i5
feat: add decimal validation for numeric precission and scale support…
2a7c9bb
…ed by spanner
@vi3k6i5
vi3k6i5 requested review from c24t, larkee, olavloite, skuruppu and thiagotnunes May 12, 2021 10:56
olavloite
olavloite approved these changes May 12, 2021
View reviewed changes

@olavloite olavloite left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/cloud/spanner_dbapi/parse_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

larkee
larkee reviewed May 13, 2021
View reviewed changes
Comment thread google/cloud/spanner_dbapi/parse_utils.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vi3k6i5

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vi3k6i5
vi3k6i5 requested a review from larkee May 14, 2021 16:17
larkee
larkee reviewed May 17, 2021
View reviewed changes
Comment thread google/cloud/spanner_v1/_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/spanner_v1/_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/cloud/spanner_v1/_helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/unit/test__helpers.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vi3k6i5
fix: moved decimal validation from spanner_dbapi to spanner_v1/helper…
74e9551
… function
@vi3k6i5
vi3k6i5 requested a review from larkee May 17, 2021 07:37
larkee
larkee approved these changes May 17, 2021
View reviewed changes

@larkee larkee left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
This was referenced Jun 15, 2021
fix: remove error msg check from test_decimal_precision_limit googleapis/python-spanner-django#646
Merged
fix: remove error msg check from test_decimal_precision_limit for non emulator test googleapis/python-spanner-django#647
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@skuruppu skuruppu Awaiting requested review from skuruppu
@thiagotnunes thiagotnunes Awaiting requested review from thiagotnunes
@c24t c24t Awaiting requested review from c24t
2 more reviewers
@olavloite olavloite olavloite approved these changes
@larkee larkee larkee approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add validation in decimal to numeric conversion

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@vi3k6i5 @olavloite @larkee
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.