Skip to content

test(bigquery-jdbc): update tests to run in TPC - #14014

Open
logachev wants to merge 8 commits into
mainfrom
kirl/tpc_tests
Open

test(bigquery-jdbc): update tests to run in TPC#14014
logachev wants to merge 8 commits into
mainfrom
kirl/tpc_tests

Conversation

@logachev

@logachev logachev commented Aug 8, 2026

Copy link
Copy Markdown
Contributor
  • Update all tests queries to use 'GENERATE_ARRAY' instead of public datasets. There are two reasons:
    1. Running these queries in EU region or in TPC will fail
    2. We saw in the past public dataset was moved and we had to adjust it
    3. We're not validating actual queries, so underlying data should be irrelevant
  • Update some tests to use escape characters for table names due to TPC projects following : format and : is not allowed in SQL
  • Mark a lot of tests as disabled in tpc. Will review them 1 by 1 & re-enable, keeping this PR a little shorter.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@logachev

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@logachev
logachev marked this pull request as ready for review August 11, 2026 18:29
@logachev
logachev requested review from a team as code owners August 11, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant