Repository navigation
fix(bigquery-jdbc): format TIMESTAMP as UTC in getString and add multi-zone TIMESTAMP(12) tests - #14666
Open
keshavdandeva wants to merge 1 commit into
Open
fix(bigquery-jdbc): format TIMESTAMP as UTC in getString and add multi-zone TIMESTAMP(12) tests#14666keshavdandeva wants to merge 1 commit into
keshavdandeva wants to merge 1 commit into
Conversation
…i-zone TIMESTAMP(12) tests
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the BigQuery JDBC driver to consistently format and return TIMESTAMP values as UTC strings instead of relying on the JVM's default time zone. Key changes include adding UTC timestamp formatting utility methods in BigQueryTemporalUtility, updating BigQueryBaseArray and BigQueryBaseStruct to format timestamps to UTC in their toString() methods, and optimizing BigQueryTypeRegistry to handle String.class conversions directly. Additionally, various integration and unit tests have been added or updated to verify timezone-independent timestamp behavior across different JVM zones. There are no review comments to address, and the changes look solid.
logachev
approved these changes
Oct 16, 2026
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
b/563395776
b/565818888
Summary
TIMESTAMPvalues in UTC (ZoneOffset.UTC) when callingResultSet.getString()orResultSet.getObject(..., String.class)across scalar,ARRAY<TIMESTAMP>, andSTRUCT<TIMESTAMP>columns, while preserving local wall-clock digits forDATETIME.BigQueryBaseResultSet.getStandardSQLTypeName()to returnStandardSQLTypeName.ARRAYfor repeated fields sogetObject(int, Class<T>)does not treatARRAY<TIMESTAMP>columns as scalarTIMESTAMP.getStringandTIMESTAMP(12)temporal accessors across both REST JSON and Storage Read API (Arrow) result sets.Testing
BigQueryJsonResultSetTestandBigQueryArrowResultSetTest.testGetString_returnsUtcDigitsandtestRoundTrip_getStringThenSetStringinITTimestampTimeZoneTest.testTemporalAccessors_picosEnabled_truncateToJavaPrecisioninITJdbcTimestampPicosTestacross JVM timezones and both JSON/Arrow read paths.