-
Notifications
You must be signed in to change notification settings - Fork 120
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: fix timestamp rounding issue #1645
Conversation
c92a91b
to
2ecbcc3
Compare
Fixes googleapis#1644 remove unrelated test case update test case
1c4b876
to
53ead88
Compare
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 isn't a complete fix. We should really be setting the formatOptions.useInt64Timestamp
request parameters to avoid any need for rounding at all:
Otherwise, BigQuery has an internal conversion to floating point, which likely can cause issues even with rounding.
Since Java allows exposing the raw string value, technically setting this would be a breaking change, so I'm okay with the current fix, but we should leave the issue open and consider taking a breaking change to fully address this.
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/FieldValue.java
Show resolved
Hide resolved
🤖 I have created a release \*beep\* \*boop\* --- ## [2.3.0](https://www.github.com/googleapis/java-bigquery/compare/v2.2.1...v2.3.0) (2021-10-15) ### Features * add session support ([#1652](https://www.github.com/googleapis/java-bigquery/issues/1652)) ([acc6cb8](https://www.github.com/googleapis/java-bigquery/commit/acc6cb8ad318ae41a9a3a00a5942025c14cbe681)) ### Bug Fixes * fix timestamp rounding issue ([#1645](https://www.github.com/googleapis/java-bigquery/issues/1645)) ([e60bdff](https://www.github.com/googleapis/java-bigquery/commit/e60bdff9e196a618a59a0544ec93f87b2ec5fc82)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Towards #1644
Temp fix timestamp rounding error (to microsecond) which can be reproduced by setting query priority to
INTERACTIVE
.