Skip to content

chore: fix typos in the executor #2671

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

Merged
merged 3 commits into from
Oct 13, 2023
Merged
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ implementation 'com.google.cloud:google-cloud-spanner'
If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-spanner:6.50.0'
implementation 'com.google.cloud:google-cloud-spanner:6.50.1'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.50.0"
libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.50.1"
```
<!-- {x-version-update-end} -->

Expand Down Expand Up @@ -432,7 +432,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.50.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.50.1
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public void setDatabaseClient(DatabaseClient client) {
dbClient = client;
}

/** Return a list of serviceKeyFile column types of the given table. */
/** Return a list of key column types of the given table. */
public List<com.google.spanner.v1.Type> getKeyColumnTypes(String tableName)
throws SpannerException {
Preconditions.checkNotNull(metadata);
Expand Down Expand Up @@ -2381,7 +2381,7 @@ private Status executeRead(
String.format("Executing read %s\n%s\n", executionContext.getTransactionSeed(), action));
List<com.google.spanner.v1.Type> typeList = new ArrayList<>();
if (action.hasIndex()) {
// For index read, we assume the serviceKeyFile columns are listed at the front of the read
// For index read, we assume the key columns are listed at the front of the read
// column
// list.
for (int i = 0; i < action.getColumnCount(); ++i) {
Expand Down Expand Up @@ -2900,19 +2900,19 @@ private static com.google.cloud.spanner.KeyRange keyRangeProtoToCloudKeyRange(
// Unreachable.
default:
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT, "Unrecognized serviceKeyFile range type");
ErrorCode.INVALID_ARGUMENT, "Unrecognized key range type");
}
}

/** Convert a serviceKeyFile proto(value list) to a cloud Key. */
/** Convert a key proto(value list) to a cloud Key. */
private static com.google.cloud.spanner.Key keyProtoToCloudKey(
com.google.spanner.executor.v1.ValueList keyProto, List<com.google.spanner.v1.Type> typeList)
throws SpannerException {
com.google.cloud.spanner.Key.Builder cloudKey = com.google.cloud.spanner.Key.newBuilder();
if (typeList.size() < keyProto.getValueCount()) {
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
"There's more serviceKeyFile parts in " + keyProto + " than column types in " + typeList);
"There's more key parts in " + keyProto + " than column types in " + typeList);
}

for (int i = 0; i < keyProto.getValueCount(); ++i) {
Expand All @@ -2934,7 +2934,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
default:
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
"Unsupported null serviceKeyFile part type: " + type.getCode().name());
"Unsupported null key part type: " + type.getCode().name());
}
} else if (part.hasIntValue()) {
cloudKey.append(part.getIntValue());
Expand All @@ -2953,8 +2953,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
// Unreachable
default:
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
"Unsupported serviceKeyFile part type: " + type.getCode().name());
ErrorCode.INVALID_ARGUMENT, "Unsupported key part type: " + type.getCode().name());
}
} else if (part.hasStringValue()) {
if (type.getCode() == TypeCode.NUMERIC) {
Expand All @@ -2969,7 +2968,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
cloudKey.append(dateFromDays(part.getDateDaysValue()));
} else {
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT, "Unsupported serviceKeyFile part: " + part);
ErrorCode.INVALID_ARGUMENT, "Unsupported key part: " + part);
}
}
return cloudKey.build();
Expand Down