Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add precision overwritten to 9 digit if the passed in JSON type is FLOAT or DOUBLE #1932

Merged
merged 61 commits into from
Jan 18, 2023

Conversation

GaoleMeng
Copy link
Contributor

for JSON, decimal value's precision is machine dependent, a 0.1 passed in could be resulted to 0.100000005
which will fail the scale check done inside BigDecimalByteStringEncoder.encodeToNumericByteString
we should round the number to 9 digit precision to prevent customer's need to convert to string value for decimal value

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

GaoleMeng and others added 30 commits September 13, 2022 01:58
also fixed a tiny bug inside fake bigquery write impl for getting thre
response from offset
possible the proto schema does not contain this field
@GaoleMeng GaoleMeng changed the title [fix]: add precision overwritten to 9 digit if the passed in JSON type is FLOAT or DOUBLE fix: add precision overwritten to 9 digit if the passed in JSON type is FLOAT or DOUBLE Jan 17, 2023
@GaoleMeng GaoleMeng added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
@GaoleMeng GaoleMeng added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@GaoleMeng GaoleMeng added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2023
@GaoleMeng GaoleMeng added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@GaoleMeng GaoleMeng added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
@GaoleMeng GaoleMeng added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jan 17, 2023
@GaoleMeng GaoleMeng added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants