fix(bigquery-jdbc): fix getExportedKeys SQL and add TPC metadata tests - #14062
fix(bigquery-jdbc): fix getExportedKeys SQL and add TPC metadata tests#14062keshavdandeva wants to merge 4 commits into
getExportedKeys SQL and add TPC metadata tests#14062Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the SQL query for retrieving exported keys to correctly use backticks for catalog and schema names, and adds null checks to environment variable validations in the integration tests. Additionally, a new integration test is introduced to verify various database metadata operations. The feedback highlights a potential resource leak where the database connection is not safely closed if an exception is thrown during statement creation, suggesting the use of try-with-resources.
| @@ -23,6 +23,7 @@ | |||
|
|
|||
| import com.google.cloud.bigquery.jdbc.BigQueryConnection; | |||
| import java.sql.Connection; | |||
There was a problem hiding this comment.
Actually this file is not used, I need to remove it after validating that there are no unique tests.
We're running regular set of tests in TPC. We should have regular metadata test validating this scenario
|
The getExportedKeys SQL works without this change. The new tests would be redundant as the plan is to delete the |
b/543942439
Changes
DatabaseMetaData_GetExportedKeys.sql: Updated SQL to use`%1$s`.`%2$s`.INFORMATION_SCHEMA.<VIEW>ITTPCBigQueryTest.java: AddedtestDatabaseMetadataOperationsInTPC()and added null checks forENDPOINT_URL,UNIVERSE_DOMAIN, and auth environment variables.Verification
ITTPCBigQueryTest#testDatabaseMetadataOperationsInTPCagainst live TPC projecttpczero-system:bigquery-driversonapis-tpczero.goog