Skip to content

Commit 54d4511

Browse files
chore: fix typos in the executor (#2671)
* Update CloudClientExecutor.java Fix typos in the executor. * reformat the code. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 8d38ca3 commit 54d4511

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ public void setDatabaseClient(DatabaseClient client) {
632632
dbClient = client;
633633
}
634634

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

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

29182918
for (int i = 0; i < keyProto.getValueCount(); ++i) {
@@ -2934,7 +2934,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
29342934
default:
29352935
throw SpannerExceptionFactory.newSpannerException(
29362936
ErrorCode.INVALID_ARGUMENT,
2937-
"Unsupported null serviceKeyFile part type: " + type.getCode().name());
2937+
"Unsupported null key part type: " + type.getCode().name());
29382938
}
29392939
} else if (part.hasIntValue()) {
29402940
cloudKey.append(part.getIntValue());
@@ -2953,8 +2953,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
29532953
// Unreachable
29542954
default:
29552955
throw SpannerExceptionFactory.newSpannerException(
2956-
ErrorCode.INVALID_ARGUMENT,
2957-
"Unsupported serviceKeyFile part type: " + type.getCode().name());
2956+
ErrorCode.INVALID_ARGUMENT, "Unsupported key part type: " + type.getCode().name());
29582957
}
29592958
} else if (part.hasStringValue()) {
29602959
if (type.getCode() == TypeCode.NUMERIC) {
@@ -2969,7 +2968,7 @@ private static com.google.cloud.spanner.Key keyProtoToCloudKey(
29692968
cloudKey.append(dateFromDays(part.getDateDaysValue()));
29702969
} else {
29712970
throw SpannerExceptionFactory.newSpannerException(
2972-
ErrorCode.INVALID_ARGUMENT, "Unsupported serviceKeyFile part: " + part);
2971+
ErrorCode.INVALID_ARGUMENT, "Unsupported key part: " + part);
29732972
}
29742973
}
29752974
return cloudKey.build();

0 commit comments

Comments
 (0)