test(bigquery-jdbc): update tests to run in TPC - #14014
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors integration tests in the BigQuery JDBC driver by replacing public dataset queries with dynamically generated data using UNNEST(GENERATE_ARRAY(...)) and introducing a centralized validateStatement helper. While this reduces external dependencies, several critical issues were identified in the review. Specifically, converting queries to Standard SQL in tests configured for Legacy SQL (BIG_QUERY dialect) will cause syntax errors, and removing table references in location-restriction tests will prevent expected exceptions from being thrown. Additionally, an unaliased column in testSmallSelectAndVerifyResults may lead to result retrieval failures.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors several integration tests in the BigQuery JDBC driver to use self-contained queries (via UNNEST and GENERATE_ARRAY) instead of relying on external public datasets, and introduces a shared validateStatement helper in ITBase to reduce boilerplate. It also adds @tag("disable_tpc") to various tests and improves environment variable checks. The review feedback highlights opportunities to prevent resource leaks in ITConnectionPoolingTest by using try-with-resources, points out a semantically confusing use of the success-validation helper inside assertThrows in ITPSCBigQueryTest, and notes that a legacy SQL test was incorrectly updated to use standard SQL, defeating its original purpose.
:is not allowed in SQL