impl(bigquery): dry run queries should be routed to jobs.insert - #6523
Conversation
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
jobs.querydon't provide full job statistics, so routing tojobs.insertis more useful. Also, since dry run queries don't have queries results or are marked as complete, we change examples to show just using aQueryhandle, notuntil_doneor aCompleteQuery. Right now callinguntil_doneit's going to throw a RPC Binding Error (empty job_id), but will eval if worth it introducing a newQueryError::DryRunQuerySupersedes #6508