Skip to content

Commit a973a8d

Browse files
committed
lint
1 parent d543779 commit a973a8d

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkArgument;
2020

21-
import java.io.Serializable;
22-
import java.util.ArrayList;
23-
import java.util.List;
24-
25-
import org.checkerframework.checker.nullness.qual.NonNull;
26-
2721
import com.google.api.core.BetaApi;
2822
import com.google.api.core.InternalApi;
2923
import com.google.api.gax.paging.Page;
@@ -36,6 +30,10 @@
3630
import com.google.common.base.Function;
3731
import com.google.common.collect.ImmutableList;
3832
import com.google.common.collect.Lists;
33+
import java.io.Serializable;
34+
import java.util.ArrayList;
35+
import java.util.List;
36+
import org.checkerframework.checker.nullness.qual.NonNull;
3937

4038
/**
4139
* An interface for Google Cloud BigQuery.
@@ -51,7 +49,7 @@ public interface BigQuery extends Service<BigQueryOptions> {
5149
* Resource</a>
5250
*/
5351
enum DatasetField implements FieldSelector {
54-
ACCESS("access"),testTableResultJobIdAndQueryId
52+
ACCESS("access"),
5553
CREATION_TIME("creationTime"),
5654
DATASET_REFERENCE("datasetReference"),
5755
DEFAULT_TABLE_EXPIRATION_MS("defaultTableExpirationMsS"),
@@ -1612,8 +1610,8 @@ TableResult query(QueryJobConfiguration configuration, JobId jobId, JobOption...
16121610
throws InterruptedException, JobException;
16131611

16141612
/**
1615-
* Starts the query associated with the request, using the given JobId. It returns either TableResult
1616-
* for quick queries or Job object for long-running queries.
1613+
* Starts the query associated with the request, using the given JobId. It returns either
1614+
* TableResult for quick queries or Job object for long-running queries.
16171615
*
16181616
* <p>If the location of the job is not "US" or "EU", the {@code jobId} must specify the job
16191617
* location.
@@ -1629,7 +1627,8 @@ TableResult query(QueryJobConfiguration configuration, JobId jobId, JobOption...
16291627
* to complete
16301628
* @throws JobException if the job completes unsuccessfully
16311629
*/
1632-
Object queryWithTimeout(QueryJobConfiguration configuration, JobId jobId, Long timeoutMs, JobOption... options)
1630+
Object queryWithTimeout(
1631+
QueryJobConfiguration configuration, JobId jobId, Long timeoutMs, JobOption... options)
16331632
throws InterruptedException, JobException;
16341633

16351634
/**

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,8 +1928,7 @@ public TableResult query(QueryJobConfiguration configuration, JobOption... optio
19281928
return query(configuration, null, options);
19291929
}
19301930

1931-
private Object queryRpc(
1932-
final String projectId, final QueryRequest content, JobOption... options)
1931+
private Object queryRpc(final String projectId, final QueryRequest content, JobOption... options)
19331932
throws InterruptedException {
19341933
com.google.api.services.bigquery.model.QueryResponse results;
19351934
Span queryRpc = null;
@@ -2034,14 +2033,15 @@ public com.google.api.services.bigquery.model.QueryResponse call()
20342033
public TableResult query(QueryJobConfiguration configuration, JobId jobId, JobOption... options)
20352034
throws InterruptedException, JobException {
20362035
Object result = queryWithTimeout(configuration, jobId, null, options);
2037-
if (result instanceof Job){
2036+
if (result instanceof Job) {
20382037
return ((Job) result).getQueryResults();
2039-
}
2038+
}
20402039
return (TableResult) result;
20412040
}
20422041

20432042
@Override
2044-
public Object queryWithTimeout(QueryJobConfiguration configuration, JobId jobId, Long timeoutMs, JobOption... options)
2043+
public Object queryWithTimeout(
2044+
QueryJobConfiguration configuration, JobId jobId, Long timeoutMs, JobOption... options)
20452045
throws InterruptedException, JobException {
20462046
Job.checkNotDryRun(configuration, "query");
20472047

@@ -2068,7 +2068,9 @@ && getOptions().getOpenTelemetryTracer() != null) {
20682068
// fail with "Access denied" if the project do not have enough permissions to run the job.
20692069

20702070
String projectId =
2071-
jobId != null && jobId.getProject() != null ? jobId.getProject() : getOptions().getProjectId();
2071+
jobId != null && jobId.getProject() != null
2072+
? jobId.getProject()
2073+
: getOptions().getProjectId();
20722074
QueryRequest content = requestInfo.toPb();
20732075
// Be careful when setting the location, if a location is specified in the BigQueryOption or
20742076
// JobId the job created by the query method will be in that location, even if the table to
@@ -2080,7 +2082,7 @@ && getOptions().getOpenTelemetryTracer() != null) {
20802082
} else if (getOptions().getLocation() != null) {
20812083
content.setLocation(getOptions().getLocation());
20822084
}
2083-
if (timeoutMs != null){
2085+
if (timeoutMs != null) {
20842086
content.setTimeoutMs(timeoutMs);
20852087
}
20862088

0 commit comments

Comments
 (0)