Repository navigation
Conversation
…otalSlotMs flake Re-enable ITBigQueryTest.testQueryStatistics and replace SELECT CURRENT_TIMESTAMP() AS ts with SELECT SUM(x) AS total FROM UNNEST(GENERATE_ARRAY(1, 1000000)) AS x. A scalar-only query such as SELECT CURRENT_TIMESTAMP() can finish in under 1 ms of slot time on BigQuery's short-query path and legitimately report 0 totalSlotMs, causing assertThat(statistics.getTotalSlotMs()).isGreaterThan(0L) to flake. Summing a generated array remains self-contained with 0 bytes scanned (no external table dependency, safe on regional and GraalVM Native Image runs) while reliably executing real slot work. Fixes b/574587826.
Contributor
There was a problem hiding this comment.
Code Review
This pull request re-enables the previously disabled testQueryStatistics integration test in ITBigQueryTest.java. The test query has been updated from a simple timestamp selection to a compute-intensive query (SELECT SUM(x) AS total FROM UNNEST(GENERATE_ARRAY(1, 1000000)) AS x) to ensure BigQuery executes real slot work and reports non-zero slot time, resolving the flakiness issue. Additionally, the unused Disabled import has been removed. There are no review comments, and I have no feedback to provide.
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.
Re-enable ITBigQueryTest.testQueryStatistics and replace
SELECT CURRENT_TIMESTAMP() AS tswithSELECT SUM(x) AS total FROM UNNEST(GENERATE_ARRAY(1, 1000000)) AS x.It's possible that a scalar-only query such as
SELECT CURRENT_TIMESTAMP()can finish in under 1 ms of slot time on BigQuery's short-query path and report 0 totalSlotMs. Switch to summing a generated array remains self-contained with 0 bytes scanned.Fixes b/574587826