feat(bigquery-jdbc): add EnableTimestampPicos connection property and its plumbing - #14284
feat(bigquery-jdbc): add EnableTimestampPicos connection property and its plumbing#14284keshavdandeva wants to merge 3 commits into
EnableTimestampPicos connection property and its plumbing#14284Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new connection property, EnableTimestampPicos, to support 12-digit picosecond precision for TIMESTAMP(12) data types in the BigQuery JDBC driver. The feedback highlights a critical issue in BigQueryStatement.java where catching any BigQueryException when EnableTimestampPicos is enabled and Legacy SQL is used will mask all other unrelated errors (such as syntax errors or permission issues). It is recommended to inspect the exception details to ensure the error is actually related to timestamp precision before throwing the compatibility exception.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new connection property, EnableTimestampPicos, to enable 12-digit picosecond precision for TIMESTAMP(12) data types in the BigQuery JDBC driver. The changes span documentation, configuration utilities, connection settings, and statements, along with corresponding unit tests. Feedback on the changes includes a request to implement the missing error translation logic and tests for Legacy SQL backend failures as described in the PR description, and a suggestion to use Boolean.TRUE.equals() when retrieving the property from the data source to prevent a potential NullPointerException from automatic unboxing.
b/544843125
This PR introduces the
EnableTimestampPicosconnection property to configure 12-digit picosecond precision for BigQueryTIMESTAMP(12)data, establishing the configuration foundation across the driver pipeline.Key Changes
ENABLE_TIMESTAMP_PICOS_PROPERTY_NAME = "EnableTimestampPicos"(default:false) inBigQueryJdbcUrlUtility.javaDataSource.javaand registered the setter inPROPERTY_SETTERSviaconvertIntToBoolean(supporting1,0,true,false)BigQueryConnection.java(registered inSAFE_TO_LOG_PROPERTIES) and into immutableBigQuerySettings.javadocs/USER_GUIDE.mdTesting
BigQueryJdbcUrlUtilityTest.java: Verified parsing ofEnableTimestampPicos(1and0).BigQueryConnectionTest.java: Verified default (false) and URL-configured (true) states.