Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that driver-internal database operations (such as connection validation, metadata queries, and pooled connection delegation) are not reported as user activity in usage telemetry. It introduces internal statement creation methods, tracks metadata retrieval and parameter binding to record them at most once, and improves error status reporting for Write API batch failures. Feedback from the review highlights a potential data race in BigQueryConnection.getMetaDataInternal() due to unsynchronized lazy initialization, and suggests replacing absolute local file paths in SKILL.md with relative paths.
… from tracked skills It was swept into the main merge by accident; main tracks only the shared bigquery-jdbc-testing and bigquery-jdbc-prepare-pr skills.
Neenu1995
marked this pull request as ready for review
November 17, 2026 15:24
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.
What & Why
BigQueryDriver.connectstartup logging,BigQueryConnection.isValidhealth checks, andBigQueryDatabaseMetaDatainternal queries through internal helpers (getMetaDataInternal,createStatementInternal,prepareStatementInternal) so driver housekeeping is not counted as user activity. SynchronizegetMetaDataInternalso threads sharing a connection initialize and see a singleDatabaseMetaDatainstance.Connection,ResultSet, orPreparedStatementrather than on every repeated call. InBigQueryPreparedStatement.executeBatch, record batch usage on success only and mark Storage Write failures (SQLException/RuntimeException) asSTATUS_ERRORinstead ofSTATUS_UNSPECIFIED.maven-failsafe-pluginJava Virtual Machine (JVM) memory (-Xmx1536m -XX:MaxDirectMemorySize=1g -XX:+ExitOnOutOfMemoryError) and reduceITStatementTest.testScriptrow counts from 500k/700k/900k to 30k/40k/50k (still above the 30k Arrow Read activation threshold) so direct-memory (memory allocated outside the Java heap) spikes fail the offending test withOutOfMemoryErrorinstead of killing the build container (exit 137).How It Was Tested
make unittest): Added tests inBigQueryConnectionTest,BigQueryDatabaseMetaDataTest,BigQueryDriverTest,BigQueryJsonResultSetTest,BigQueryPreparedStatementSettersTest, andBigQueryStatementTestcovering internal-call exclusion, once-per-object feature counts, concurrentgetMetaData(), and batch error reporting.ITStatementTest#testScriptrequires Google Cloud credentials and is verified in presubmit.Risks / Follow-ups
OutOfMemoryErrorand should be right-sized similarly.