feat(bigquery-jdbc): add picosecond precision support for TIMESTAMP - #14038
Open
keshavdandeva wants to merge 2 commits into
Open
feat(bigquery-jdbc): add picosecond precision support for TIMESTAMP#14038keshavdandeva wants to merge 2 commits into
keshavdandeva wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for 12-digit picosecond precision for TIMESTAMP columns in the BigQuery JDBC driver, controlled by a new connection property EnableTimestampPicos. It updates result set implementations, connection settings, statement processing, and metadata to handle picosecond precision when enabled. One high-severity issue was identified where the default value for the EnableTimestampPicos property is set to the string "false" instead of "0", which could cause parsing errors during connection initialization.
keshavdandeva
marked this pull request as ready for review
August 11, 2026 14:38
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/544839231
This PR introduces support for picosecond precision (up to 12 fractional digits) when reading BigQuery
TIMESTAMPcolumns, building on top of #14037Overview
To maintain strict backwards compatibility, picosecond precision is disabled by default and activated via the new
EnableTimestampPicosconnection property:displaySize=26, precision=26, scale=6),getString(),getTimestamp(), andgetObject().displaySize=32, precision=32, scale=12inResultSetMetaDataand preserves full 12-digit picosecond precision ingetString().Changes Made
Configuration:
EnableTimestampPicosconnection property inBigQueryConnectionandDataSource.Arrow Storage Engine:
ReadSessioncreation inBigQueryStatementto explicitly requestTIMESTAMP_PRECISION_PICOSwhenEnableTimestampPicosis active.Text -> TimestampandString -> TimestampinBigQueryTypeCoercionUtilityusingBigQueryTemporalUtility::boxTimestampsogetObject()andgetTimestamp()seamlessly handle Arrow picosecondVarCharVectorcolumns.JDBC Metadata:
BigQueryResultSetMetadatato reportdisplaySize=32,precision=32, andscale=12whenEnableTimestampPicosis active and the column schema precision is 12.Temporal Utilities & API Safety:
boxTimestamp(): Gracefully down-casts 12-digit picosecond strings to 9 digits (nanoseconds) forjava.sql.Timestamp, which maxes out at nanosecond precision and would otherwise throw aDateTimeParseException.formatTimestampStringFromIso(): Standardized ISO-8601 formatting supporting both'T'/'Z', SQL space-delimited (' '/' UTC'), and raw strings.Testing
BigQueryArrowResultSetTestverifyinggetString(),getTimestamp(), andgetObject()against picosecondTextcolumns.BigQueryResultSetMetadataTestverifying precision, scale, and display size with picoseconds enabled and disabled.ArrowFormatTypeBigQueryCoercionUtilityTestandBigQueryTemporalUtilityTest.