Skip to content

impl(bigquery): dry run queries should be routed to jobs.insert - #6523

Merged
alvarowolfx merged 3 commits into
googleapis:mainfrom
alvarowolfx:impl-bq-route-dry-run
Aug 24, 2026
Merged

impl(bigquery): dry run queries should be routed to jobs.insert#6523
alvarowolfx merged 3 commits into
googleapis:mainfrom
alvarowolfx:impl-bq-route-dry-run

Conversation

@alvarowolfx

Copy link
Copy Markdown
Contributor

jobs.query don't provide full job statistics, so routing to jobs.insert is more useful. Also, since dry run queries don't have queries results or are marked as complete, we change examples to show just using a Query handle, not until_done or a CompleteQuery. Right now calling until_done it's going to throw a RPC Binding Error (empty job_id), but will eval if worth it introducing a new QueryError::DryRunQuery

Supersedes #6508

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Aug 24, 2026

@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 updates the BigQuery query execution logic to route dry run queries through the jobs.insert API instead of jobs.query so that full statistics are returned. It also updates the dry run example and adds corresponding unit tests. Feedback was provided regarding a potential panic or RPC error when calling .until_done() on a dry run query, as the returned Job resource may lack a valid active job status or job ID. It is suggested to update Query::from_job to handle dry run queries gracefully by marking them as completed immediately.

Comment thread src/bigquery/src/query/execution.rs
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.39%. Comparing base (ceb8e53) to head (c254eac).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6523      +/-   ##
==========================================
- Coverage   96.39%   96.39%   -0.01%     
==========================================
  Files         301      301              
  Lines       84762    84808      +46     
==========================================
+ Hits        81709    81752      +43     
- Misses       3053     3056       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alvarowolfx
alvarowolfx marked this pull request as ready for review August 24, 2026 16:05
@alvarowolfx
alvarowolfx requested a review from a team as a code owner August 24, 2026 16:05
Comment thread src/bigquery/src/query/execution.rs Outdated
Comment thread src/bigquery/src/query/execution.rs
Comment thread src/bigquery/src/query/execution.rs
@alvarowolfx
alvarowolfx merged commit 5e2c1e0 into googleapis:main Aug 24, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants