-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.
Description
Is your feature request related to a problem? Please describe.
Even if the Job object we have contains that the job is "done" we do a remote call for no reason.
Describe the solution you'd like
I would first check the current state, and only do a remote call if needed, or the current state contains "false".
Describe alternatives you've considered
Additional context
Instead of
public boolean isDone() {
checkNotDryRun("isDone");
Job job = bigquery.getJob(getJobId(), JobOption.fields(BigQuery.JobField.STATUS));
return job == null || JobStatus.State.DONE.equals(job.getStatus().getState());
}do this
public boolean isDone() {
checkNotDryRun("isDone");
if (getStatus() != null && JobStatus.State.DONE.equals(getStatus().getState()) {
return true;
}
Job job = bigquery.getJob(getJobId(), JobOption.fields(BigQuery.JobField.STATUS));
return job == null || JobStatus.State.DONE.equals(job.getStatus().getState());
}Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.