test(bigquery-jdbc): add picosecond timestamp integration tests - #14392
Open
keshavdandeva wants to merge 2 commits into
Open
keshavdandeva wants to merge 2 commits into
keshavdandeva wants to merge 2 commits into
Conversation
keshavdandeva
added this pull request to stack #14393
September 15, 2026 19:25
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds support for 12-digit picosecond precision for TIMESTAMP(12) data types in the BigQuery JDBC driver when EnableTimestampPicos is enabled, configuring DataFormatOptions to use ISO8601_STRING serialization. The changes include documentation updates, unit tests, and comprehensive integration tests. The reviewer suggested using a UUID-based suffix instead of a random integer for test table names to prevent potential collisions in concurrent CI/CD pipelines.
keshavdandeva
marked this pull request as ready for review
September 15, 2026 19:29
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/556664087
This PR adds ITs and and fixes one gap the ITs uncovered.
Production fix
BigQueryConnection.getBigQueryConnection()now setsDataFormatOptions.TimestampFormatOptions.ISO8601_STRINGwhenEnableTimestampPicos=1.The REST JSON read path was silently truncating to microseconds. BigQuery
serializes
TIMESTAMPas FLOAT64 epoch seconds by default, which cannotrepresent sub-microsecond digits;
ISO8601_STRINGis the only output formatthat carries the full 12-digit fraction. The Arrow path was already correct,
which is why unit tests and metadata assertions passed while REST values did
not.
Gated on the property so the wire format is unchanged for existing users.
Tests
New
ITJdbcTimestampPicosTest(11 tests): Arrow and REST read paths, complextypes (
ARRAY/STRUCT),ResultSetMetaData,DatabaseMetaData.getColumns,PreparedStatementround trips, Legacy SQL rejection, and timezoneinvariance.
Registered in the presubmit, nightly, and driver-agnostic suites. Six tests
carry
@Tag("advanced")where behavior is driver-specific; the remaining fivewere verified to pass against other drivers.
Known limitation
BigQuery truncates
TIMESTAMP-typed query parameters to microseconds evenagainst a
TIMESTAMP(12)column (b/419328655), sosetTimestamp/setObjectcannot write picosecond values.
setStringworks, since the value is coercedserver side. Documented in
USER_GUIDE.mdand asserted in the tests so theexpectations flip loudly when the backend fix lands.