Skip to content

chore: format source code with google-java-format 1.25.2 #3737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
- run: java -version
- run: .kokoro/build.sh
env:
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test)
RETURN_CODE=$?
;;
lint)
mvn com.coveo:fmt-maven-plugin:check -B -ntp
mvn com.spotify.fmt:fmt-maven-plugin:check -B -ntp
RETURN_CODE=$?
;;
javadoc)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public static Role valueOf(String constant) {
return type.valueOf(constant);
}

/** @return Return the known values for Role. */
/**
* @return Return the known values for Role.
*/
public static Role[] values() {
return type.values();
}
Expand Down Expand Up @@ -184,7 +186,9 @@ public DatasetAclEntity(DatasetId id, List<String> targetTypes) {
this.targetTypes = targetTypes;
}

/** @return Returns DatasetAclEntity's identity. */
/**
* @return Returns DatasetAclEntity's identity.
*/
public DatasetId getId() {
return id;
}
Expand Down Expand Up @@ -240,7 +244,9 @@ public Domain(String domain) {
this.domain = domain;
}

/** @return Returns the domain name. */
/**
* @return Returns the domain name.
*/
public String getDomain() {
return domain;
}
Expand Down Expand Up @@ -348,22 +354,30 @@ Access toPb() {
}
}

/** @return Returns a Group entity representing all project's owners. */
/**
* @return Returns a Group entity representing all project's owners.
*/
public static Group ofProjectOwners() {
return new Group(PROJECT_OWNERS);
}

/** @return Returns a Group entity representing all project's readers. */
/**
* @return Returns a Group entity representing all project's readers.
*/
public static Group ofProjectReaders() {
return new Group(PROJECT_READERS);
}

/** @return Returns a Group entity representing all project's writers. */
/**
* @return Returns a Group entity representing all project's writers.
*/
public static Group ofProjectWriters() {
return new Group(PROJECT_WRITERS);
}

/** @return Returns a Group entity representing all BigQuery authenticated users. */
/**
* @return Returns a Group entity representing all BigQuery authenticated users.
*/
public static Group ofAllAuthenticatedUsers() {
return new Group(ALL_AUTHENTICATED_USERS);
}
Expand All @@ -385,7 +399,9 @@ public User(String email) {
this.email = email;
}

/** @return Returns user's email. */
/**
* @return Returns user's email.
*/
public String getEmail() {
return email;
}
Expand Down Expand Up @@ -437,7 +453,9 @@ public View(TableId id) {
this.id = id;
}

/** @return Returns table's identity. */
/**
* @return Returns table's identity.
*/
public TableId getId() {
return id;
}
Expand Down Expand Up @@ -489,7 +507,9 @@ public Routine(RoutineId id) {
this.id = id;
}

/** @return Returns routine's identity. */
/**
* @return Returns routine's identity.
*/
public RoutineId getId() {
return id;
}
Expand Down Expand Up @@ -537,7 +557,9 @@ public IamMember(String iamMember) {
this.iamMember = iamMember;
}

/** @return Returns iamMember. */
/**
* @return Returns iamMember.
*/
public String getIamMember() {
return iamMember;
}
Expand Down Expand Up @@ -574,16 +596,19 @@ Access toPb() {
public static final class Expr implements Serializable {
// Textual representation of an expression in Common Expression Language syntax.
private final String expression;

/**
* Optional. Title for the expression, i.e. a short string describing its purpose. This can be
* used e.g. in UIs which allow to enter the expression.
*/
private final String title;

/**
* Optional. Description of the expression. This is a longer text which describes the
* expression, e.g. when hovered over it in a UI.
*/
private final String description;

/**
* Optional. String indicating the location of the expression for error reporting, e.g. a file
* name and a position in the file.
Expand Down Expand Up @@ -713,16 +738,23 @@ private Acl(Entity entity, Role role, Expr condition) {
this.condition = condition;
}

/** @return Returns the entity for this ACL. */
/**
* @return Returns the entity for this ACL.
*/
public Entity getEntity() {
return entity;
}

/** @return Returns the role specified by this ACL. */
/**
* @return Returns the role specified by this ACL.
*/
public Role getRole() {
return role;
}
/** @return Returns the condition specified by this ACL. */

/**
* @return Returns the condition specified by this ACL.
*/
public Expr getCondition() {
return condition;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,8 +1409,7 @@ public TableResult query(QueryJobConfiguration configuration, JobOption... optio

if (getOptions().isQueryPreviewEnabled()) {
configuration =
configuration
.toBuilder()
configuration.toBuilder()
.setJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ private int getBufferSize() {
? 20000
: Math.min(connectionSettings.getNumBufferedRows() * 2, 100000));
}

/**
* Cancel method shutdowns the pageFetcher and producerWorker threads gracefully using interrupt.
* The pageFetcher threat will not request for any subsequent threads after interrupting and
Expand Down Expand Up @@ -263,6 +264,7 @@ private BigQueryResult getExecuteSelectResponse(
throw new BigQuerySQLException(e.getMessage(), e, e.getErrors());
}
}

/**
* Execute a SQL statement that returns a single ResultSet and returns a ListenableFuture to
* process the response asynchronously.
Expand Down Expand Up @@ -527,6 +529,7 @@ BigQueryResultStats getBigQueryResultSetStats(JobId jobId) {
queryStatistics.getSessionInfo() == null ? null : queryStatistics.getSessionInfo();
return new BigQueryResultStatsImpl(queryStatistics, sessionInfo);
}

/* This method processed the first page of GetQueryResultsResponse and then it uses tabledata.list */
@VisibleForTesting
BigQueryResult tableDataList(GetQueryResultsResponse firstPage, JobId jobId) {
Expand Down Expand Up @@ -1109,7 +1112,9 @@ private ArrowRowReader(ArrowSchema arrowSchema, Map<String, Integer> arrowNameTo
loader = new VectorLoader(root);
}

/** @param batch object returned from the ReadRowsResponse. */
/**
* @param batch object returned from the ReadRowsResponse.
*/
private void processRows(
ArrowRecordBatch batch, BlockingQueue<BigQueryResultImpl.Row> buffer, Schema schema)
throws IOException { // deserialize the values and consume the hash of the values
Expand Down Expand Up @@ -1166,6 +1171,7 @@ public void close() {
allocator.close();
}
}

/*Returns just the first page of GetQueryResultsResponse using the jobId*/
@VisibleForTesting
GetQueryResultsResponse getQueryResultsFirstPage(JobId jobId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public static final class Builder {
private String key;
private String value;

private Builder() {};
private Builder() {}
;

private Builder(ConnectionProperty properties) {
this.key = properties.key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public Builder setFormatOptions(FormatOptions formatOptions) {
/** Sets the table Hive partitioning options. */
public Builder setHivePartitioningOptions(HivePartitioningOptions hivePartitioningOptions) {
return setHivePartitioningOptionsInner(hivePartitioningOptions);
};
}
;

/**
* When creating an external table, the user can provide a reference file with the table schema.
Expand Down Expand Up @@ -253,7 +254,8 @@ public Builder setMaxStaleness(String maxStaleness) {
@Nullable
public Boolean ignoreUnknownValues() {
return getIgnoreUnknownValues();
};
}
;

@Nullable
public abstract Boolean getIgnoreUnknownValues();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class JobException extends RuntimeException {
public JobId getId() {
return id;
}

/**
* The errors reported by the job.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,8 @@ public static class Builder {
private String name;
private Long slotMs;

private Builder() {};
private Builder() {}
;

Builder setName(String name) {
this.name = name;
Expand Down Expand Up @@ -1486,7 +1487,8 @@ public static class Builder {

private String transactionId;

private Builder() {};
private Builder() {}
;

Builder setTransactionId(String transactionId) {
this.transactionId = transactionId;
Expand Down Expand Up @@ -1557,7 +1559,8 @@ public static class Builder {

private String sessionId;

private Builder() {};
private Builder() {}
;

Builder setSessionId(String sessionId) {
this.sessionId = sessionId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,56 +46,70 @@ public LegacySQLTypeName apply(String constant) {
/** Variable-length binary data. */
public static final LegacySQLTypeName BYTES =
type.createAndRegister("BYTES").setStandardType(StandardSQLTypeName.BYTES);

/** Variable-length character (Unicode) data. */
public static final LegacySQLTypeName STRING =
type.createAndRegister("STRING").setStandardType(StandardSQLTypeName.STRING);

/** A 64-bit signed integer value. */
public static final LegacySQLTypeName INTEGER =
type.createAndRegister("INTEGER").setStandardType(StandardSQLTypeName.INT64);

/** A 64-bit IEEE binary floating-point value. */
public static final LegacySQLTypeName FLOAT =
type.createAndRegister("FLOAT").setStandardType(StandardSQLTypeName.FLOAT64);

/**
* A decimal value with 38 digits of precision and 9 digits of scale. Note, support for this type
* is limited in legacy SQL.
*/
public static final LegacySQLTypeName NUMERIC =
type.createAndRegister("NUMERIC").setStandardType(StandardSQLTypeName.NUMERIC);

/**
* A decimal value with 76+ digits of precision (the 77th digit is partial) and 38 digits of scale
*/
public static final LegacySQLTypeName BIGNUMERIC =
type.createAndRegister("BIGNUMERIC").setStandardType(StandardSQLTypeName.BIGNUMERIC);

/** A Boolean value (true or false). */
public static final LegacySQLTypeName BOOLEAN =
type.createAndRegister("BOOLEAN").setStandardType(StandardSQLTypeName.BOOL);

/** Represents an absolute point in time, with microsecond precision. */
public static final LegacySQLTypeName TIMESTAMP =
type.createAndRegister("TIMESTAMP").setStandardType(StandardSQLTypeName.TIMESTAMP);

/** Represents a logical calendar date. Note, support for this type is limited in legacy SQL. */
public static final LegacySQLTypeName DATE =
type.createAndRegister("DATE").setStandardType(StandardSQLTypeName.DATE);

/** Represents a set of geographic points, represented as a Well Known Text (WKT) string. */
public static final LegacySQLTypeName GEOGRAPHY =
type.createAndRegister("GEOGRAPHY").setStandardType(StandardSQLTypeName.GEOGRAPHY);

/**
* Represents a time, independent of a specific date, to microsecond precision. Note, support for
* this type is limited in legacy SQL.
*/
public static final LegacySQLTypeName TIME =
type.createAndRegister("TIME").setStandardType(StandardSQLTypeName.TIME);

/**
* Represents a year, month, day, hour, minute, second, and subsecond (microsecond precision).
* Note, support for this type is limited in legacy SQL.
*/
public static final LegacySQLTypeName DATETIME =
type.createAndRegister("DATETIME").setStandardType(StandardSQLTypeName.DATETIME);

/** A record type with a nested schema. */
public static final LegacySQLTypeName RECORD =
type.createAndRegister("RECORD").setStandardType(StandardSQLTypeName.STRUCT);

/** Represents JSON data */
public static final LegacySQLTypeName JSON =
type.createAndRegister("JSON").setStandardType(StandardSQLTypeName.JSON);

/** Represents duration or amount of time. */
public static final LegacySQLTypeName INTERVAL =
type.createAndRegister("INTERVAL").setStandardType(StandardSQLTypeName.INTERVAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public ParquetOptions build() {
return new ParquetOptions(this);
}
}

/** Returns a builder for the {@link ParquetOptions} object. */
public Builder toBuilder() {
return new Builder(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ public String getBody() {
/** Returns the Remote function specific options. */
public RemoteFunctionOptions getRemoteFunctionOptions() {
return remoteFunctionOptions;
};
}
;

/** Returns the data governance type of the routine, e.g. DATA_MASKING. */
public String getDataGovernanceType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ Tuple<String, Iterable<Model>> listModels(

Tuple<String, Iterable<Routine>> listRoutines(
String projectId, String datasetId, Map<Option, ?> options);

/**
* Deletes the requested routine.
*
Expand Down
Loading