Description
Is your feature request related to a problem? Please describe.
As reported in internal issue 180972119, with a name like done()
, I would expect it to be a very lightweight call. At most, I'd expect it to refresh the job state. It is not a lightweight call. It calls the jobs.getQueryResults
REST API, which can hang for 10 seconds or more.
Describe the solution you'd like
QueryJob.done()
should return True
if the job has finished or reload the job and return the correct answer.
This requires moving the repeated call to jobs.getQueryResults
to somewhere else in the stack of functions between QueryJob.result()
and QueryJob.done()
.
Describe alternatives you've considered
Perhaps a flag to "go fast" to done()
? This feels like it's making the developer interface unnecessarily complicated, though.
Additional context
Related to customer support case 26956233